Skip to content

Commit 85e99d8

Browse files
committed
Add grunt tasks for making the demos and uglifying the source
1 parent e566824 commit 85e99d8

7 files changed

+30
-6
lines changed

Gruntfile.js

+21-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module.exports = function(grunt) {
22
grunt.initConfig({
3+
pkg: grunt.file.readJSON('package.json'),
34
makeDemos: {
45
demos: {
56
options: {
@@ -13,10 +14,27 @@ module.exports = function(grunt) {
1314
out: './'
1415
}
1516
}
17+
},
18+
uglify: {
19+
src: {
20+
options: {
21+
banner: '/*! <%= pkg.name %> - v<%= pkg.version %>*/\n\n'
22+
},
23+
files: {
24+
'dist/angular-fusioncharts.min.js': ['src/angular-fusioncharts.js']
25+
}
26+
}
27+
},
28+
copy: {
29+
core: {
30+
files: [
31+
{src:'dist/angular-fusioncharts.min.js', dest: 'demos/js/angular-fusioncharts.min.js'}
32+
]
33+
}
1634
}
1735
});
18-
36+
grunt.loadNpmTasks('grunt-contrib-uglify');
37+
grunt.loadNpmTasks('grunt-contrib-copy');
1938
grunt.loadTasks('./grunt-tasks');
20-
21-
grunt.registerTask('default', ['makeDemos']);
39+
grunt.registerTask('default', ['makeDemos:demos', 'uglify', 'copy']);
2240
};

demos/js/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
angular-fusioncharts.min.js

demos/js/angular-fusioncharts.min.js

-1
This file was deleted.

demos/views/ex5.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<fc-chart fc-json-url="data/data.json" fc-type="column2d" fc-width="600" fc-height="400"></fc-chart><tabset>
1+
<fc-chart fc-data-format="jsonurl" fc-datasource="data/data.json" fc-type="column2d" fc-width="600" fc-height="400"></fc-chart><tabset>
22
<tab heading="HTML"><ng-prism class="language-markup">{{ html }}</ng-prism></tab>
33
<tab heading="Javascript"><ng-prism class="language-javascript">{{ js }}</ng-prism></tab>
44
</tabset>

dist/angular-fusioncharts.min.js

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

minified/angular-fusioncharts-0.1-alpha2.min.js

-1
This file was deleted.

package.json

+4
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,9 @@
1919
"dependencies": {
2020
"ejs": "^1.0.0",
2121
"grunt": "^0.4.5"
22+
},
23+
"devDependencies": {
24+
"grunt-contrib-copy": "^0.7.0",
25+
"grunt-contrib-uglify": "^0.6.0"
2226
}
2327
}

0 commit comments

Comments
 (0)