dev version will now be 0.0.0 instead of current. current is an invalid value for the version key in the package.json file for grunt

This commit is contained in:
Eric Rowell 2013-06-01 15:58:14 -07:00
parent 6d9adad2f5
commit 616e5d98f4
12 changed files with 68 additions and 36 deletions

View File

@ -41,6 +41,35 @@ module.exports = function(grunt) {
'src/filters/Mask.js' 'src/filters/Mask.js'
]; ];
var unitTestFiles = [
'tests/js/unit/animationTests.js',
'tests/js/unit/tweenTests.js',
'tests/js/unit/globalTests.js',
'tests/js/unit/utilTests.js',
'tests/js/unit/nodeTests.js',
'tests/js/unit/stageTests.js',
'tests/js/unit/containerTests.js',
'tests/js/unit/layerTests.js',
'tests/js/unit/shapeTests.js',
'tests/js/unit/ddTests.js',
'tests/js/unit/shapes/rectTests.js',
'tests/js/unit/shapes/circleTests.js',
'tests/js/unit/shapes/wedgeTests.js',
'tests/js/unit/shapes/imageTests.js',
'tests/js/unit/shapes/polygonTests.js',
'tests/js/unit/shapes/lineTests.js',
'tests/js/unit/shapes/splineTests.js',
'tests/js/unit/shapes/blobTests.js',
'tests/js/unit/shapes/textTests.js',
'tests/js/unit/shapes/spriteTests.js',
'tests/js/unit/plugins/pathTests.js',
'tests/js/unit/plugins/regularPolygonTests.js',
'tests/js/unit/plugins/starTests.js',
'tests/js/unit/plugins/textPathTests.js',
'tests/js/unit/plugins/labelTests.js'
];
// Project configuration. // Project configuration.
var config = { var config = {
pkg: grunt.file.readJSON('package.json'), pkg: grunt.file.readJSON('package.json'),
@ -48,9 +77,13 @@ module.exports = function(grunt) {
options: { options: {
separator: ';' separator: ';'
}, },
build: { source: {
src: sourceFiles, src: sourceFiles,
dest: 'dist/kinetic-v<%= pkg.version %>.js' dest: 'dist/kinetic-v<%= pkg.version %>.js'
},
test: {
src: unitTestFiles,
dest: 'tests/js/unitTests.js'
} }
}, },
replace: { replace: {
@ -117,7 +150,8 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-clean'); grunt.loadNpmTasks('grunt-contrib-clean');
// Tasks // Tasks
grunt.registerTask('dev', ['clean', 'concat', 'replace:dev']); grunt.registerTask('dev', ['clean', 'concat:source', 'replace:dev']);
grunt.registerTask('full', ['clean', 'concat', 'replace:dev', 'uglify', 'replace:prod']); grunt.registerTask('full', ['clean', 'concat:source', 'replace:dev', 'uglify', 'replace:prod']);
grunt.registerTask('test', ['concat:test']);
}; };

View File

@ -1,5 +1,5 @@
#Building the KineticJS Framework #Building the KineticJS Framework
To build the framework, you need to have Ruby and Rubygems installed. After that, run `gem install thor`, `gem install json_pure`, and `gem install uglifier` to install the dependencies. To build the framework, you need to have Grunt.js installed. After that, run `gem install thor`, `gem install json_pure`, and `gem install uglifier` to install the dependencies.
To build a development version of the framework, run `thor build:dev VERSION`, where VERSION is a string that can be anything you like. For example, using `thor build:dev current` will produce `kinetic-vcurrent.js`. To build a minified version of the framework, run `thor build:prod VERSION`. To build a development version of the framework, run `thor build:dev VERSION`, where VERSION is a string that can be anything you like. For example, using `thor build:dev current` will produce `kinetic-vcurrent.js`. To build a minified version of the framework, run `thor build:prod VERSION`.

View File

@ -1,6 +1,6 @@
{ {
"name": "KineticJS", "name": "KineticJS",
"version": "current", "version": "0.0.0",
"devDependencies": { "devDependencies": {
"grunt": "~0.4.1", "grunt": "~0.4.1",
"grunt-contrib-jshint": "~0.1.1", "grunt-contrib-jshint": "~0.1.1",

View File

@ -6,7 +6,7 @@
</style> </style>
<link rel="stylesheet" type="text/css"href="../base.css"> <link rel="stylesheet" type="text/css"href="../base.css">
<script src="../../dist/kinetic-vcurrent.js"></script> <script src="../../dist/kinetic-v0.0.0.js"></script>
<script src="../assets/functionalDataUrls.js"></script> <script src="../assets/functionalDataUrls.js"></script>
<script src="../js/Test.js"></script> <script src="../js/Test.js"></script>
<script src="../js/functionalTests.js"></script> <script src="../js/functionalTests.js"></script>

View File

@ -2,9 +2,7 @@
<html> <html>
<head> <head>
<link rel="stylesheet" type="text/css"href="../base.css"> <link rel="stylesheet" type="text/css"href="../base.css">
<script src="../../dist/kinetic-vcurrent.js"></script> <script src="../../dist/kinetic-v0.0.0.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.9.3/TweenLite.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.9.3/easing/EasePack.min.js"></script>
<!-- assets --> <!-- assets -->
<script src="../js/Test.js"></script> <script src="../js/Test.js"></script>

View File

@ -38,7 +38,7 @@
run(Kinetic); run(Kinetic);
</script> </script>
<script src="../../dist/kinetic-vcurrent.js"></script> <script src="../../dist/kinetic-v0.0.0.js"></script>
<script> <script>
run(Kinetic); run(Kinetic);
</script> </script>

View File

@ -7,17 +7,17 @@
</head> </head>
<body> <body>
<div id="container"></div> <div id="container"></div>
<script src="../../../dist/kinetic-Global-vcurrent.min.js"></script> <script src="../../../dist/kinetic-Global-v0.0.0.min.js"></script>
<script src="../../../dist/kinetic-Util-vcurrent.min.js"></script> <script src="../../../dist/kinetic-Util-v0.0.0.min.js"></script>
<script src="../../../dist/kinetic-Canvas-vcurrent.min.js"></script> <script src="../../../dist/kinetic-Canvas-v0.0.0.min.js"></script>
<script src="../../../dist/kinetic-Node-vcurrent.min.js"></script> <script src="../../../dist/kinetic-Node-v0.0.0.min.js"></script>
<script src="../../../dist/kinetic-Container-vcurrent.min.js"></script> <script src="../../../dist/kinetic-Container-v0.0.0.min.js"></script>
<script src="../../../dist/kinetic-Shape-vcurrent.min.js"></script> <script src="../../../dist/kinetic-Shape-v0.0.0.min.js"></script>
<script src="../../../dist/kinetic-Stage-vcurrent.min.js"></script> <script src="../../../dist/kinetic-Stage-v0.0.0.min.js"></script>
<script src="../../../dist/kinetic-Layer-vcurrent.min.js"></script> <script src="../../../dist/kinetic-Layer-v0.0.0.min.js"></script>
<script src="../../../dist/kinetic-Group-vcurrent.min.js"></script> <script src="../../../dist/kinetic-Group-v0.0.0.min.js"></script>
<script src="../../../dist/kinetic-Circle-vcurrent.min.js"></script> <script src="../../../dist/kinetic-Circle-v0.0.0.min.js"></script>
<script src="../../js/Test.js"></script> <script src="../../js/Test.js"></script>
<script> <script>

View File

@ -7,19 +7,19 @@
</head> </head>
<body> <body>
<div id="container"></div> <div id="container"></div>
<script src="../../../dist/kinetic-Global-vcurrent.min.js"></script> <script src="../../../dist/kinetic-Global-v0.0.0.min.js"></script>
<script src="../../../dist/kinetic-Util-vcurrent.min.js"></script> <script src="../../../dist/kinetic-Util-v0.0.0.min.js"></script>
<script src="../../../dist/kinetic-Canvas-vcurrent.min.js"></script> <script src="../../../dist/kinetic-Canvas-v0.0.0.min.js"></script>
<script src="../../../dist/kinetic-Node-vcurrent.min.js"></script> <script src="../../../dist/kinetic-Node-v0.0.0.min.js"></script>
<script src="../../../dist/kinetic-Animation-vcurrent.min.js"></script> <script src="../../../dist/kinetic-Animation-v0.0.0.min.js"></script>
<script src="../../../dist/kinetic-DragAndDrop-vcurrent.min.js"></script> <script src="../../../dist/kinetic-DragAndDrop-v0.0.0.min.js"></script>
<script src="../../../dist/kinetic-Container-vcurrent.min.js"></script> <script src="../../../dist/kinetic-Container-v0.0.0.min.js"></script>
<script src="../../../dist/kinetic-Shape-vcurrent.min.js"></script> <script src="../../../dist/kinetic-Shape-v0.0.0.min.js"></script>
<script src="../../../dist/kinetic-Stage-vcurrent.min.js"></script> <script src="../../../dist/kinetic-Stage-v0.0.0.min.js"></script>
<script src="../../../dist/kinetic-Layer-vcurrent.min.js"></script> <script src="../../../dist/kinetic-Layer-v0.0.0.min.js"></script>
<script src="../../../dist/kinetic-Group-vcurrent.min.js"></script> <script src="../../../dist/kinetic-Group-v0.0.0.min.js"></script>
<script src="../../../dist/kinetic-Circle-vcurrent.min.js"></script> <script src="../../../dist/kinetic-Circle-v0.0.0.min.js"></script>
<script src="../../js/Test.js"></script> <script src="../../js/Test.js"></script>
<script> <script>

View File

@ -9,7 +9,7 @@
</head> </head>
<body> <body>
<div id="container"></div> <div id="container"></div>
<script src="../../../dist/kinetic-vcurrent.js"></script> <script src="../../../dist/kinetic-v0.0.0.js"></script>
<script src="../../js/Test.js"></script> <script src="../../js/Test.js"></script>
<script> <script>
var stage = new Kinetic.Stage({ var stage = new Kinetic.Stage({

View File

@ -7,7 +7,7 @@
</head> </head>
<body> <body>
<div id="container"></div> <div id="container"></div>
<script src="../../../dist/kinetic-vcurrent.js"></script> <script src="../../../dist/kinetic-v0.0.0.js"></script>
<script src="../../js/Test.js"></script> <script src="../../js/Test.js"></script>
<script> <script>
var stage = new Kinetic.Stage({ var stage = new Kinetic.Stage({

View File

@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<link rel="stylesheet" type="text/css"href="../base.css"> <link rel="stylesheet" type="text/css"href="../base.css">
<script src="../../dist/kinetic-vcurrent.js"></script> <script src="../../dist/kinetic-v0.0.0.js"></script>
<!-- assets --> <!-- assets -->
<script src="../assets/worldMap.js"></script> <script src="../assets/worldMap.js"></script>

View File

@ -1,5 +1,5 @@
Test.Modules.GLOBAL = { Test.Modules.GLOBAL = {
'test Kinetic version number': function(containerId) { 'test Kinetic version number': function(containerId) {
test(Kinetic.version === 'current', 'Kinetic.version should equal current'); test(Kinetic.version === '0.0.0', 'Kinetic.version should equal 0.0.0');
} }
}; };