Skip to content

Commit

Permalink
Grunt build script and semantic versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
xeolabs committed Mar 26, 2015
1 parent e781503 commit cdbf0a6
Show file tree
Hide file tree
Showing 12 changed files with 36,584 additions and 295 deletions.
14 changes: 14 additions & 0 deletions BANNER
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* <%= pkg.title %> V<%= pkg.version %>
*
* <%= pkg.description %>
* <%= pkg.homepage %>
*
* Built on <%= grunt.template.today("yyyy-mm-dd") %>
*
* <%= pkg.license %>
* Copyright <%= grunt.template.today("yyyy") %>, <%= pkg.author.name %>
* http://xeolabs.com/
*
*/

68 changes: 68 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
module.exports = function (grunt) {

"use strict";

var devScripts = grunt.file.readJSON("dev-scripts.json");

grunt.initConfig({

pkg: grunt.file.readJSON('package.json'),
PROJECT_NAME: "<%= pkg.name %>",
ENGINE_VERSION: "<%= pkg.version %>",
build_dir: "build/<%= ENGINE_VERSION %>",
license: grunt.file.read("LICENSE.txt"),

concat: {
options: {
banner: grunt.file.read('BANNER'),
separator: ';',
process: true
},
engine: {
src: devScripts.engine,
dest: "<%= build_dir %>/<%= PROJECT_NAME %>-<%= ENGINE_VERSION %>.js"
}
},

uglify: {
options: {
report: "min",
banner: grunt.file.read('BANNER')
},
engine: {
files: {
"<%= build_dir %>/<%= PROJECT_NAME %>-<%= ENGINE_VERSION %>.min.js": "<%= concat.engine.dest %>"
}
}
},

clean: {
tmp: "tmp/*.js",
docs: ["docs/*"]
},

copy: {
minified: {
src: '<%= build_dir %>/<%= PROJECT_NAME %>-<%= ENGINE_VERSION %>.min.js',
dest: 'build/<%= PROJECT_NAME %>.min.js'
},
unminified: {
src: '<%= build_dir %>/<%= PROJECT_NAME %>-<%= ENGINE_VERSION %>.js',
dest: 'build/<%= PROJECT_NAME %>.js'
}
}
});

grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-contrib-concat");
grunt.loadNpmTasks("grunt-contrib-clean");
grunt.loadNpmTasks('grunt-contrib-copy');


grunt.registerTask("compile", ["clean", "concat", "uglify"]);
grunt.registerTask("build", ["compile"]);
grunt.registerTask("default", "compile");
grunt.registerTask("all", ["build"]);

grunt.registerTask("snapshot", ["concat", "uglify", "copy"]);
};
25 changes: 25 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// === SceneJS ===
// JavaScript Scene graph library for WebGL
// Copyright (c) 2010 Lindsay Kay
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.




8 changes: 0 additions & 8 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,6 @@ var myScene = SceneJS.createScene({

Read more in the [Quick Start tutorial](http://xeolabs.com/articles/scenejs-quick-start).

## Building
SceneJS requires nodejs and ncp. To build, simply:

```npm install ncp```

```node build.js``

Then the binaries will appear in ```./api```.



18,224 changes: 18,224 additions & 0 deletions build/4.0.0/scenejs-4.0.0.js

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions build/4.0.0/scenejs-4.0.0.min.js

Large diffs are not rendered by default.

18,065 changes: 18,065 additions & 0 deletions build/4.1.0/scenejs-4.1.0.js

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions build/4.1.0/scenejs-4.1.0.min.js

Large diffs are not rendered by default.

108 changes: 108 additions & 0 deletions dev-scripts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"engine": [
"licenses/license-header.js",
"src/lib/requireWrapperStart.js",
"src/lib/require.js",
"src/lib/requireWrapperEnd.js",
"src/lib/webgl-debug-utils.js",
"src/core/map.js",
"src/core/scenejs.js",
"src/lib/requireConfig.js",
"src/core/eventManager.js",
"src/core/plugins.js",
"src/core/events.js",
"src/core/canvas.js",
"src/core/engine.js",
"src/core/errors.js",
"src/core/config.js",
"src/core/log.js",
"src/core/math.js",
"src/core/status.js",
"src/core/webgl/webgl.js",
"src/core/webgl/arrayBuffer.js",
"src/core/webgl/attribute.js",
"src/core/webgl/enums.js",
"src/core/webgl/renderBuffer.js",
"src/core/webgl/program.js",
"src/core/webgl/sampler.js",
"src/core/webgl/shader.js",
"src/core/webgl/texture2d.js",
"src/core/webgl/uniform.js",
"src/core/scene/nodeEvents.js",
"src/core/scene/core.js",
"src/core/scene/coreFactory.js",
"src/core/scene/node.js",
"src/core/scene/pubSubProxy.js",
"src/core/scene/nodeFactory.js",
"src/core/scene/camera.js",
"src/core/scene/clips.js",
"src/core/scene/enable.js",
"src/core/scene/flags.js",
"src/core/scene/colorTarget.js",
"src/core/scene/depthTarget.js",
"src/core/scene/geometry.js",
"src/core/scene/stage.js",
"src/core/scene/layer.js",
"src/core/scene/library.js",
"src/core/scene/lights.js",
"src/core/scene/lookAt.js",
"src/core/scene/material.js",
"src/core/scene/morphGeometry.js",
"src/core/scene/name.js",
"src/core/scene/renderer.js",
"src/core/scene/depthBuffer.js",
"src/core/scene/colorBuffer.js",
"src/core/scene/view.js",
"src/core/scene/scene.js",
"src/core/scene/shader.js",
"src/core/scene/shaderParams.js",
"src/core/scene/style.js",
"src/core/scene/tag.js",
"src/core/scene/_texture.js",
"src/core/scene/texture.js",
"src/core/scene/reflect.js",
"src/core/scene/xform.js",
"src/core/scene/matrix.js",
"src/core/scene/rotate.js",
"src/core/scene/translate.js",
"src/core/scene/scale.js",
"src/core/scene/modelXFormStack.js",
"src/core/nodeTypes.js",
"src/core/display/display.js",
"src/core/display/programSourceFactory.js",
"src/core/display/programSource.js",
"src/core/display/programFactory.js",
"src/core/display/program.js",
"src/core/display/objectFactory.js",
"src/core/display/object.js",
"src/core/display/renderContext.js",
"src/core/display/chunks/chunk.js",
"src/core/display/chunks/chunkFactory.js",
"src/core/display/chunks/cameraChunk.js",
"src/core/display/chunks/clipsChunk.js",
"src/core/display/chunks/drawChunk.js",
"src/core/display/chunks/flagsChunk.js",
"src/core/display/chunks/renderTargetChunk.js",
"src/core/display/chunks/geometryChunk.js",
"src/core/display/chunks/lightsChunk.js",
"src/core/display/chunks/listenersChunk.js",
"src/core/display/chunks/lookAtChunk.js",
"src/core/display/chunks/materialChunk.js",
"src/core/display/chunks/nameChunk.js",
"src/core/display/chunks/programChunk.js",
"src/core/display/chunks/rendererChunk.js",
"src/core/display/chunks/depthBufferChunk.js",
"src/core/display/chunks/colorBufferChunk.js",
"src/core/display/chunks/viewChunk.js",
"src/core/display/chunks/shaderChunk.js",
"src/core/display/chunks/shaderParamsChunk.js",
"src/core/display/chunks/styleChunk.js",
"src/core/display/chunks/textureChunk.js",
"src/core/display/chunks/cubemapChunk.js",
"src/core/display/chunks/xformChunk.js"
],

"extras": [

]
}
Loading

0 comments on commit cdbf0a6

Please sign in to comment.