Browse Source

Merge branch 'npm-package' of https://github.com/brigand/Semantic-UI into npm

Conflicts:
	package.json
pull/795/head
jlukic 10 years ago
parent
commit
6a7e331b49
2 changed files with 51 additions and 0 deletions
  1. 1
      .gitignore
  2. 50
      Gruntfile.js

1
.gitignore

@ -4,6 +4,7 @@ node/server.json
test/coverage/
coverage/
semantic.config
semanticui/
# Numerous always-ignore extensions
*.diff

50
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'
@ -428,6 +434,24 @@ module.exports = function(grunt) {
]
},
npm: {
files: [
{
expand : true,
cwd : 'build/uncompressed',
src : [
'**/*'
],
dest: 'npm'
},
{
src: 'package.json',
dest: 'npm/package.json'
}
]
},
// create new rtl assets
buildToRTL: {
files: [
@ -565,6 +589,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 : 'npm'
}
]
}
},
uglify: {
minifyJS: {
@ -631,6 +680,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');

Loading…
Cancel
Save