Skip to content
Snippets Groups Projects
Unverified Commit 58e7b38f authored by aeschylus's avatar aeschylus Committed by GitHub
Browse files

Merge branch 'develop' into update-vat-https

parents 6ba19e15 8ea48886
No related branches found
No related tags found
No related merge requests found
module.exports = function(grunt) {
// ----------
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks("gruntify-eslint");
......@@ -185,25 +184,6 @@ module.exports = function(grunt) {
}
},
compress: {
zip: {
options: {
archive: 'build/mirador.zip'
},
files: [
{ expand: true, cwd: 'build/', src: ['mirador/**'] }
]
},
tar: {
options: {
archive: 'build/mirador.tar'
},
files: [
{ expand: true, cwd: 'build/', src: [ 'mirador/**' ] }
]
}
},
connect: {
server: {
options: {
......@@ -289,28 +269,18 @@ module.exports = function(grunt) {
});
// ----------
// Lint task
grunt.registerTask('lint', ['jshint', 'eslint'])
grunt.registerTask('lint', ['jshint', 'eslint']);
// ----------
// Build task.
// Cleans out the build folder and builds the code and images into it, checking lint.
grunt.registerTask('build', [ 'clean:build', 'git-describe', 'lint', 'less', 'concat:css', 'uglify', 'cssmin', 'copy']);
grunt.registerTask('build', [ 'clean:build', 'git-describe', 'lint', 'less', 'concat', 'uglify', 'cssmin', 'copy']);
// ----------
// Dev Build task.
// Build, but skip the time-consuming and obscurantist minification and uglification.
grunt.registerTask('dev_build', [ 'clean:build', 'git-describe', 'lint', 'less', 'concat', 'copy']);
// ----------
// Package task.
// Builds and creates the .zip and .tar files.
grunt.registerTask('package', ['build', 'compress']);
// ----------
// Publish task.
// Cleans the built files out of the release folder and copies newly built ones over.
grunt.registerTask('publish', ['package', 'clean:release', 'copy:release']);
// ----------
// Default task.
// Does a normal build.
......
# remove previous packages
rm -rf build/mirador*
rm -rf build dist
# build package
node_modules/.bin/grunt package
node_modules/.bin/grunt build
# mk tmp release dir
mkdir -p build/tmp/build/mirador
# unzip build
unzip build/mirador.zip -d build/tmp/build
# copy mirador build into tmp folder
cp -r build/mirador/* build/tmp/build/mirador
# add example
# add example(s)
cp examples/example.html build/tmp/build
cd build/tmp
......@@ -22,4 +22,10 @@ mv build/build.zip ../
tar -czvf build/build.tar.gz build/
mv build/build.tar.gz ../
cd -
# remove temporary files
cd .. && rm -rf tmp
# make npm dist directory
cd ..
mkdir dist
cp -r build/mirador/* dist
......@@ -2,7 +2,7 @@
rm -rf build/mirador*
# build package
node_modules/.bin/grunt package
node_modules/.bin/grunt build
# mk tmp release dir
mkdir build/tmp
......@@ -27,6 +27,7 @@ cp -R build/tmp/mirador/themes demo
# Copy over files
cp build/tmp/mirador/mirador.min.js demo
cp build/tmp/mirador/mirador.js demo
cp build/tmp/mirador/ZeroClipboard.swf demo
# Clean up extra files
......
{
"name": "mirador",
"version": "2.5.1",
"version": "2.6.1",
"description": "Multi-window image viewer, a web-based tool to support researcher goals",
"files": ["dist/*"],
"repository": {
"type": "git",
"url": "https://github.com/ProjectMirador/mirador"
......@@ -52,6 +53,7 @@
"test": "./node_modules/.bin/karma start ./karma.conf.js",
"travis": "./node_modules/.bin/grunt ci --verbose --force & npm run test",
"update_demo": "./bin/update_demo.sh",
"release": "./bin/create_release.sh",
"lint": "./node_modules/.bin/eslint js/src"
},
"dependencies": {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment