Commit 22d754ee authored by Romain Courteaud's avatar Romain Courteaud

Stop using grunt to build the jio release.

We do not want to depend on node to work on jio.
parent c2d7e791
...@@ -21,8 +21,6 @@ module.exports = function (grunt) { ...@@ -21,8 +21,6 @@ module.exports = function (grunt) {
"use strict"; "use strict";
grunt.loadNpmTasks('grunt-jslint'); grunt.loadNpmTasks('grunt-jslint');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-copy');
// Project configuration. // Project configuration.
grunt.initConfig({ grunt.initConfig({
...@@ -131,71 +129,10 @@ module.exports = function (grunt) { ...@@ -131,71 +129,10 @@ module.exports = function (grunt) {
] ]
}, },
}, },
}, }
concat: {
options: {
separator: ';'
},
jio: {
// duplicate files are ignored
src: [
'lib/uri/URI.js',
'node_modules/uritemplate/bin/uritemplate.js',
'node_modules/lz-string/libs/lz-string.js',
'node_modules/moment/moment.js',
// queries
'src/queries/parser-begin.js',
'src/queries/build/parser.js',
'src/queries/parser-end.js',
'src/queries/query.js',
'src/jio.date/*.js',
'src/jio.js',
'node_modules/rusha/rusha.js',
'src/jio.storage/replicatestorage.js',
'src/jio.storage/shastorage.js',
'src/jio.storage/uuidstorage.js',
'src/jio.storage/memorystorage.js',
'src/jio.storage/zipstorage.js',
'src/jio.storage/parserstorage.js',
'src/jio.storage/httpstorage.js',
'src/jio.storage/dropboxstorage.js',
'src/jio.storage/davstorage.js',
'src/jio.storage/gdrivestorage.js',
'src/jio.storage/unionstorage.js',
'src/jio.storage/erp5storage.js',
'src/jio.storage/querystorage.js',
'src/jio.storage/drivetojiomapping.js',
'src/jio.storage/documentstorage.js',
'src/jio.storage/localstorage.js',
'src/jio.storage/indexeddbstorage.js',
'src/jio.storage/cryptstorage.js',
'src/jio.storage/websqlstorage.js',
'src/jio.storage/fbstorage.js',
'src/jio.storage/cloudooostorage.js'
],
dest: 'dist/<%= pkg.name %>-<%= pkg.version %>.js'
// dest: 'jio.js'
}
},
copy: {
latest: {
files: [{
src: '<%= concat.jio.dest %>',
dest: "dist/<%= pkg.name %>-latest.js"
}]
}
},
}); });
grunt.registerTask('default', ['all']); grunt.registerTask('default', ['all']);
grunt.registerTask('all', ['lint', 'build']); grunt.registerTask('all', ['lint']);
grunt.registerTask('lint', ['jslint']); grunt.registerTask('lint', ['jslint']);
grunt.registerTask('build', ['concat', 'copy']);
}; };
DISTDIR = dist
SRCDIR = src
VERSION = 3.32.1
JIOVERSION = ${DISTDIR}/jio-v${VERSION}.js
JIOLATEST = ${DISTDIR}/jio-latest.js
all: build
build: ${JIOLATEST}
${JIOLATEST}: ${JIOVERSION}
@echo copy
cp $< $@
${JIOVERSION}: lib/uri/URI.js \
node_modules/uritemplate/bin/uritemplate.js \
node_modules/lz-string/libs/lz-string.js \
node_modules/moment/moment.js \
${SRCDIR}/queries/parser-begin.js \
${SRCDIR}/queries/build/parser.js \
${SRCDIR}/queries/parser-end.js \
${SRCDIR}/queries/query.js \
${SRCDIR}/jio.date/*.js \
${SRCDIR}/jio.js \
node_modules/rusha/rusha.js \
${SRCDIR}/jio.storage/replicatestorage.js \
${SRCDIR}/jio.storage/shastorage.js \
${SRCDIR}/jio.storage/uuidstorage.js \
${SRCDIR}/jio.storage/memorystorage.js \
${SRCDIR}/jio.storage/zipstorage.js \
${SRCDIR}/jio.storage/parserstorage.js \
${SRCDIR}/jio.storage/httpstorage.js \
${SRCDIR}/jio.storage/dropboxstorage.js \
${SRCDIR}/jio.storage/davstorage.js \
${SRCDIR}/jio.storage/gdrivestorage.js \
${SRCDIR}/jio.storage/unionstorage.js \
${SRCDIR}/jio.storage/erp5storage.js \
${SRCDIR}/jio.storage/querystorage.js \
${SRCDIR}/jio.storage/drivetojiomapping.js \
${SRCDIR}/jio.storage/documentstorage.js \
${SRCDIR}/jio.storage/localstorage.js \
${SRCDIR}/jio.storage/indexeddbstorage.js \
${SRCDIR}/jio.storage/cryptstorage.js \
${SRCDIR}/jio.storage/websqlstorage.js \
${SRCDIR}/jio.storage/fbstorage.js \
${SRCDIR}/jio.storage/cloudooostorage.js
@echo concat
@mkdir -p $(@D)
cat $^ > $@
######################## JISON ########################
# dir # dir
QUERIES_DIR = src/queries QUERIES_DIR = src/queries
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
}, },
"scripts": { "scripts": {
"lint": "./node_modules/.bin/grunt lint", "lint": "./node_modules/.bin/grunt lint",
"prepublish": "./node_modules/.bin/grunt build" "prepublish": "make"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
...@@ -37,8 +37,6 @@ ...@@ -37,8 +37,6 @@
"renderjs": "git+https://lab.nexedi.com/romain/renderjs.git#wip", "renderjs": "git+https://lab.nexedi.com/romain/renderjs.git#wip",
"grunt": "0.4.x", "grunt": "0.4.x",
"grunt-cli": "~0.1.11", "grunt-cli": "~0.1.11",
"grunt-contrib-concat": "0.3.x",
"grunt-contrib-copy": "~0.4.1",
"grunt-contrib-qunit": "~0.3.0", "grunt-contrib-qunit": "~0.3.0",
"grunt-jslint": "~1.0.0", "grunt-jslint": "~1.0.0",
"lz-string": "^1.4.4", "lz-string": "^1.4.4",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment