diff --git a/.gitignore b/.gitignore index 242a85d..56fea92 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,10 @@ /.settings +/dist /node_modules /test/triage/ .DS_Store -npm-debug.log +.pyftpsync-meta.json .sizecache.json +npm-debug.log sauce_connect.log sc_*.log - -demo/.pyftpsync-meta.json - -.pyftpsync-meta.json diff --git a/CHANGELOG.md b/CHANGELOG.md index d481972..28f017d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 2.0.0 / Unreleased branch: 'dist-folder' + +* [BREAKING CHANGE] Distribution files moved from project root to /dist folder. + # 1.18.2 / Unreleased # 1.18.1 / 2017-08-28 diff --git a/Gruntfile.coffee b/Gruntfile.coffee index cbb5dd1..10c44de 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -1,10 +1,14 @@ -#jshint node: true, camelcase: false +#jshint node: true, camelcase: false "use strict" module.exports = (grunt) -> grunt.initConfig - pkg: + pkg: grunt.file.readJSON("package.json") + clean: + dist: + src: [ "dist" ] + connect: demo: options: @@ -24,6 +28,13 @@ module.exports = (grunt) -> base: "" keepalive: false + copy: + dist: # copy production files to dist folder + files: [{ + src: ["LICENSE.txt", "jquery.ui-contextmenu.js"] + dest: "dist/" + }] + exec: tabfix: # Cleanup whitespace according to http://contribute.jquery.org/style-guide/js/ @@ -104,7 +115,7 @@ module.exports = (grunt) -> # "http://localhost:9999/test/index.html", # "http://localhost:9999/test/index-jquery-ui-1-10.html" ] - + # username: process.env.SAUCE_USERNAME, # key: process.env.SAUCE_ACCESS_KEY, build: process.env.TRAVIS_JOB_ID @@ -164,8 +175,8 @@ module.exports = (grunt) -> build: options: sourceMap: true - src: "jquery.ui-contextmenu.js" - dest: "jquery.ui-contextmenu.min.js" + src: "dist/jquery.ui-contextmenu.js" + dest: "dist/jquery.ui-contextmenu.min.js" watch: dev: @@ -189,7 +200,7 @@ module.exports = (grunt) -> bump: {} # 'bump' uses the increment mode `yabs:release:MODE` by default run_build: { tasks: ['build'] } replace_build: - files: ['jquery.ui-contextmenu.min.js'] + files: ['dist/jquery.ui-contextmenu.min.js', 'dist/jquery.ui-contextmenu.js'] patterns: [ { match: /@VERSION/g, replacement: '{%= version %}'} ] @@ -208,8 +219,8 @@ module.exports = (grunt) -> # Load "grunt*" dependencies for key of grunt.file.readJSON("package.json").devDependencies - grunt.loadNpmTasks key if key isnt "grunt" and key.indexOf("grunt") is 0 - + grunt.loadNpmTasks key if key isnt "grunt" and key.indexOf("grunt") is 0 + grunt.registerTask "server", ["connect:demo"] grunt.registerTask "dev", ["connect:dev", "watch:dev"] grunt.registerTask "test", ["jshint", "jscs", "qunit"] @@ -222,8 +233,14 @@ module.exports = (grunt) -> grunt.registerTask "travis", ["test", "sauce"] grunt.registerTask "default", ["test"] grunt.registerTask "ci", ["test"] # Called by 'npm test' - + # "sauce", - grunt.registerTask "build", ["exec:tabfix", "test", "uglify"] + grunt.registerTask "build", [ + # "exec:tabfix" + "test" + "clean:dist" + "copy:dist" + "uglify" + ] grunt.registerTask "upload", ["build", "exec:upload"] grunt.registerTask "server", ["connect:demo"] diff --git a/README.md b/README.md index 17ec882..25b7a14 100644 --- a/README.md +++ b/README.md @@ -53,9 +53,9 @@ First, include dependencies: ```html - - - + + + ``` diff --git a/bower.json b/bower.json index 7c27274..180b151 100644 --- a/bower.json +++ b/bower.json @@ -3,7 +3,7 @@ "description": "Turn a jQuery UI Menu widget into a contextmenu.", "version": "1.18.2-0", "main": [ - "jquery.ui-contextmenu.js" + "dist/jquery.ui-contextmenu.js" ], "moduleType": "globals", "license": "MIT", @@ -14,7 +14,6 @@ "/lib", "/test", "bower.json", - "ui-contextmenu.jquery.json", "Gruntfile.coffee" ], "keywords": [ @@ -44,4 +43,4 @@ "jquery-ui": ">=1.9" }, "devDependencies": {} -} \ No newline at end of file +} diff --git a/jquery.ui-contextmenu.js b/jquery.ui-contextmenu.js index 8b11028..bc2d598 100644 --- a/jquery.ui-contextmenu.js +++ b/jquery.ui-contextmenu.js @@ -43,7 +43,7 @@ $.widget("moogle.contextmenu", { menu: null, // selector or jQuery pointing to