Skip to content

Commit c1bd680

Browse files
committed
Build Package Updated
ReadMe, NPM, Bower, & Grunt updated.
1 parent 1a4b9d7 commit c1bd680

File tree

6 files changed

+202
-126
lines changed

6 files changed

+202
-126
lines changed

.npmignore

+21-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,27 @@ dist/docs/img
2121
dist/docs/index.html
2222

2323

24-
/docs
24+
docs
2525
node_modules
2626
npm-debug.log
2727
lib
28-
.bower
28+
.bower
29+
30+
31+
.openshift
32+
/misc
33+
/scripts
34+
/src
35+
/styles
36+
test
37+
.bowerrc
38+
.editorconfig
39+
.gitattributes
40+
.htmlhintrc
41+
.travis.yml
42+
bower.json
43+
deploy_key.enc
44+
eslint.yaml
45+
grunt-ngdocs-index.tmpl
46+
Gruntfile.js
47+
/server.js

CHANGELOG.md

-17
This file was deleted.

Gruntfile.js

+35-4
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,37 @@ module.exports = function (grunt) {
8282
src: ['canvas-dot-grid.png'],
8383
dest: 'dist/imgs',
8484
expand: true
85+
},
86+
distless: {
87+
src: ['styles/**/*.less', 'src/**/*.less'],
88+
dest: 'dist/less',
89+
expand: true,
90+
flatten: true
91+
},
92+
distlessDependencies: {
93+
src: ['node_modules/patternfly/dist/less/color-variables.less'],
94+
dest: 'dist/less/dependencies/patternfly',
95+
expand: true,
96+
flatten: true
97+
}
98+
},
99+
'string-replace': {
100+
dist: {
101+
files: [{
102+
cwd: 'dist/less/',
103+
src: ['angular-patternfly.less'],
104+
dest: 'dist/less',
105+
expand: true
106+
}],
107+
options: {
108+
replacements: [{
109+
pattern: /\.\.\/src\/(.*?)+\//g,
110+
replacement: ''
111+
},{
112+
pattern: '../node_modules/patternfly/dist/less',
113+
replacement: 'dependencies/patternfly'
114+
}]
115+
}
85116
}
86117
},
87118
less: {
@@ -298,7 +329,7 @@ module.exports = function (grunt) {
298329
}
299330
});
300331

301-
grunt.registerTask('copymain', ['copy:docdata', 'copy:fa', 'copy:img', 'copy:distimg']);
332+
grunt.registerTask('copymain', ['copy:docdata', 'copy:fa', 'copy:img', 'copy:distimg', 'copy:distless', 'copy:distlessDependencies']);
302333

303334
// You can specify which modules to build as arguments of the build task.
304335
grunt.registerTask('build', 'Create bootstrap build files', function () {
@@ -318,13 +349,13 @@ module.exports = function (grunt) {
318349
concatSrc = 'src/**/*.js';
319350
}
320351

321-
grunt.task.run(['clean', 'lint', 'test', 'ngtemplates', 'concat', 'ngAnnotate', 'uglify:build', 'less', 'cssmin', 'copymain', 'ngdocs', 'clean:templates']);
352+
grunt.task.run(['clean', 'lint', 'test', 'ngtemplates', 'concat', 'ngAnnotate', 'uglify:build', 'less', 'cssmin', 'copymain', 'string-replace', 'ngdocs', 'clean:templates']);
322353
});
323354

324355
// Runs all the tasks of build with the exception of tests
325356
grunt.registerTask('deploy', 'Prepares the project for deployment. Does not run unit tests', function () {
326357
var concatSrc = 'src/**/*.js';
327-
grunt.task.run(['clean', 'lint', 'ngtemplates', 'concat', 'ngAnnotate', 'uglify:build', 'less', 'cssmin', 'copymain', 'ngdocs', 'clean:templates']);
358+
grunt.task.run(['clean', 'lint', 'ngtemplates', 'concat', 'ngAnnotate', 'uglify:build', 'less', 'cssmin', 'copymain', 'string-replace', 'ngdocs', 'clean:templates']);
328359
});
329360

330361
grunt.registerTask('default', ['build']);
@@ -333,7 +364,7 @@ module.exports = function (grunt) {
333364
grunt.registerTask('test', ['karma']);
334365
grunt.registerTask('check', ['lint', 'test']);
335366
grunt.registerTask('help', ['availabletasks']);
336-
grunt.registerTask('server', ['ngdocs:view']);
367+
grunt.registerTask('serve', ['ngdocs:view']);
337368
grunt.registerTask('ngdocs:publish', ['remove:published', 'copy:publish']);
338369

339370
}

0 commit comments

Comments
 (0)