packaged for publishing

This commit is contained in:
mig 2017-04-27 07:14:02 +02:00
parent b2fcd9b705
commit f746927262
5 changed files with 11 additions and 17 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
node_modules/
dist/
update-gh-pages.sh
tmp/

5
.npmignore Normal file
View file

@ -0,0 +1,5 @@
src/
node_modules/
tmp/
update-gh-pages.sh
gulpfile.js

View file

@ -113,8 +113,9 @@ function HandleModuleGames(modelOnly) {
var stream = gulp.src(scripts)
.pipe(gulpif(!argv.prod,sourcemaps.init()))
.pipe(add('_',modulifyHeaders[which],true))
.pipe(concat(fileName))
.pipe(concat(fileName))
.pipe(gulpif(argv.prod,uglify()))
.on('error', function (err) { gutil.log(gutil.colors.red('[Error]'), err.toString()); })
.pipe(gulpif(!argv.prod,sourcemaps.write('.')))
.pipe(through.obj(function(file,enc,next) {
push(file);
@ -191,15 +192,11 @@ gulp.task("build-node-core",function() {
"src/core/jocly.game.js"
]));
var joclyExtraStream = gulp.src([
"src/node/package.json",
]);
var allGamesStream = source('jocly-allgames.js');
allGamesStream.end('exports.games = '+JSON.stringify(allGames));
allGamesStream = ProcessJS(allGamesStream.pipe(buffer()));
return merge(joclyCoreStream,allGamesStream,joclyBaseStream,joclyExtraStream)
return merge(joclyCoreStream,allGamesStream,joclyBaseStream)
.pipe(gulp.dest("dist/node"));
})

View file

@ -1,11 +1,12 @@
{
"name": "jocly",
"version": "0.0.1",
"version": "0.9.0",
"author": {
"email": "mig@jocly.com",
"name": "Michel Gutierrez",
"url": "https://github.com/mi-g"
},
"main": "dist/node/jocly.core.js",
"scripts": {
"build": "gulp dist"
},

View file

@ -1,10 +0,0 @@
{
"name": "jocly-node",
"version": "0.0.1",
"author": {
"email": "mig@jocly.com",
"name": "Michel Gutierrez",
"url": "https://github.com/mi-g"
},
"main": "jocly.core.js"
}