From 98ed45ced56926c9546f52928e34ee7c88f50ada Mon Sep 17 00:00:00 2001 From: Frankie Bagnardi Date: Thu, 20 Mar 2014 13:46:26 -0700 Subject: [PATCH 1/4] created npm build task --- .gitignore | 1 + Gruntfile.js | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 15 +++++++-------- 3 files changed, 58 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 3fe3af4b4..31f0ca954 100755 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ node/server.json test/coverage/ coverage/ semantic.config +semanticui/ # Numerous always-ignore extensions *.diff diff --git a/Gruntfile.js b/Gruntfile.js index ffb70d986..8ba8f9416 100755 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -82,6 +82,12 @@ module.exports = function(grunt) { // creates custom license in header 'cssmin:createMinCSSPackage', + // create npm package + 'copy:npm', + + // replace $.fn.xyz with module.exports and require('jquery') + 'replace:npm', + // cleans previous generated release 'clean:release' @@ -427,6 +433,24 @@ module.exports = function(grunt) { ] }, + + npm: { + files: [ + { + expand : true, + cwd : 'build/uncompressed', + src : [ + '**/*' + ], + dest: 'semanticui' + }, + { + src: 'package.json', + dest: 'semanticui/package.json' + } + ] + }, + // create new rtl assets buildToRTL: { files: [ @@ -564,6 +588,31 @@ module.exports = function(grunt) { } }, + replace: { + npm: { + options: { + patterns: [ + { + match: /\$.fn.\w+/g, + replacement: 'module.exports' + }, + { + match: /jQuery/g, + replacement: 'require("jquery")' + } + ] + }, + files: [ + { + expand : true, + src : '**/*.js', + cwd : 'build/uncompressed', + dest : 'semanticui' + } + ] + } + }, + uglify: { minifyJS: { @@ -630,6 +679,7 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-cssmin'); grunt.loadNpmTasks('grunt-contrib-less'); + grunt.loadNpmTasks('grunt-replace'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-watch'); diff --git a/package.json b/package.json index 54764d7ac..208402a9b 100755 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "semantic", + "name": "semanticui", "version": "0.15.1", "title": "Semantic UI", "description": "Semantic empowers designers and developers by creating a shared vocabulary for UI.", @@ -13,13 +13,15 @@ "type": "git", "url": "git://github.com/Semantic-Org/Semantic-UI.git" }, - "dependencies": {}, + "dependencies": { + "jquery": "*" + }, "devDependencies": { "docpad": "~6.63.3", "docpad-plugin-eco": "~2.0.3", - "docpad-plugin-ghpages": "~2.4.1", + "docpad-plugin-ghpages": "~2.4.2", "docpad-plugin-partials": "~2.8.1", - "grunt": "~0.4.1", + "grunt": "~0.4.4", "grunt-contrib-watch": "~0.5.3", "grunt-contrib-clean": "~0.5.0", "grunt-contrib-uglify": "~0.2.2", @@ -40,9 +42,6 @@ "grunt-autoprefixer": "~0.4.0", "grunt-karma-coveralls": "~2.2.0", "karma-coverage": "~0.1.4", - "docpad-plugin-partials": "~2.8.1", - "docpad-plugin-ghpages": "~2.4.2", - "docpad-plugin-eco": "~2.0.3", - "docpad": "~6.63.3" + "grunt-replace": "~0.7.3" } } From 0a150c4fb41cd4a91fb1641bb384528cb9a2269e Mon Sep 17 00:00:00 2001 From: Frankie Bagnardi Date: Thu, 20 Mar 2014 13:59:40 -0700 Subject: [PATCH 2/4] fixed accidentally removed dependencies --- package.json | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 208402a9b..78547c51d 100755 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "semanticui", + "name": "semantic", "version": "0.15.1", "title": "Semantic UI", "description": "Semantic empowers designers and developers by creating a shared vocabulary for UI.", @@ -14,14 +14,14 @@ "url": "git://github.com/Semantic-Org/Semantic-UI.git" }, "dependencies": { - "jquery": "*" + "jquery": "1.*" }, "devDependencies": { "docpad": "~6.63.3", "docpad-plugin-eco": "~2.0.3", - "docpad-plugin-ghpages": "~2.4.2", + "docpad-plugin-ghpages": "~2.4.1", "docpad-plugin-partials": "~2.8.1", - "grunt": "~0.4.4", + "grunt": "~0.4.1", "grunt-contrib-watch": "~0.5.3", "grunt-contrib-clean": "~0.5.0", "grunt-contrib-uglify": "~0.2.2", @@ -33,6 +33,7 @@ "grunt-css": "~0.5.4", "grunt-contrib-compress": "~0.5.2", "grunt-contrib-concat": "~0.3.0", + "grunt-replace": "~0.7.3", "grunt-docco-multi": "0.0.2", "grunt-cssjanus": "~0.1.1", "karma": "~0.10.2", @@ -42,6 +43,9 @@ "grunt-autoprefixer": "~0.4.0", "grunt-karma-coveralls": "~2.2.0", "karma-coverage": "~0.1.4", - "grunt-replace": "~0.7.3" + "docpad-plugin-partials": "~2.8.1", + "docpad-plugin-ghpages": "~2.4.2", + "docpad-plugin-eco": "~2.0.3", + "docpad": "~6.63.3" } } From 0d2c74d98adfb312f34b028d57e9ceed7344010a Mon Sep 17 00:00:00 2001 From: Frankie Bagnardi Date: Thu, 20 Mar 2014 14:00:40 -0700 Subject: [PATCH 3/4] fixed package name (semantic is taken) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 78547c51d..c1c1f3f7f 100755 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "semantic", + "name": "semanticui", "version": "0.15.1", "title": "Semantic UI", "description": "Semantic empowers designers and developers by creating a shared vocabulary for UI.", From f34c847a9380be0105f1164c7c8aa9e9e34c2d62 Mon Sep 17 00:00:00 2001 From: Frankie Bagnardi Date: Fri, 4 Apr 2014 18:34:58 -0700 Subject: [PATCH 4/4] change semanticui to semantic-ui and folder to npm --- Gruntfile.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 8ba8f9416..edb38860f 100755 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -442,11 +442,11 @@ module.exports = function(grunt) { src : [ '**/*' ], - dest: 'semanticui' + dest: 'npm' }, { src: 'package.json', - dest: 'semanticui/package.json' + dest: 'npm/package.json' } ] }, @@ -607,7 +607,7 @@ module.exports = function(grunt) { expand : true, src : '**/*.js', cwd : 'build/uncompressed', - dest : 'semanticui' + dest : 'npm' } ] } diff --git a/package.json b/package.json index c1c1f3f7f..6e96cc43e 100755 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "semanticui", + "name": "semantic-ui", "version": "0.15.1", "title": "Semantic UI", "description": "Semantic empowers designers and developers by creating a shared vocabulary for UI.",