Skip to content

Commit

Permalink
Feature/add tar build output (#3)
Browse files Browse the repository at this point in the history
* Remove unused libraries

* Fix npm audit

* Add tar build output

* Update README shell outputs

* Bump Revision
  • Loading branch information
tomhollingworth authored Aug 6, 2020
1 parent 530f69f commit 17ff1ef
Show file tree
Hide file tree
Showing 6 changed files with 1,067 additions and 4,044 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
dist
libre-downtime-pie-chart-panel.zip
libre-downtime-pie-chart-panel.zip
libre-downtime-pie-chart-panel.tar.gz
22 changes: 16 additions & 6 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
module.exports = function (grunt) {
require('load-grunt-tasks')(grunt)

grunt.loadNpmTasks('grunt-execute')
grunt.loadNpmTasks('grunt-contrib-clean')
grunt.loadNpmTasks('grunt-multi-dest')
grunt.loadNpmTasks('grunt-babel')
grunt.loadNpmTasks('grunt-force-task')
grunt.loadNpmTasks('grunt-contrib-clean')
grunt.loadNpmTasks('grunt-contrib-compress')
grunt.loadNpmTasks('grunt-contrib-copy')
grunt.loadNpmTasks('grunt-contrib-jshint')
grunt.loadNpmTasks('grunt-contrib-watch')
grunt.loadNpmTasks('grunt-string-replace')

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
clean: ['dist', 'libre-downtime-pie-chart-panel.zip'],
clean: ['dist', 'libre-downtime-pie-chart-panel.zip', 'libre-downtime-pie-chart-panel.tar.gz'],

jshint: {
options: {
Expand Down Expand Up @@ -93,6 +94,14 @@ module.exports = function (grunt) {
expand: true,
cwd: 'dist/',
src: ['**/*']
},
tar: {
options: {
archive: 'libre-downtime-pie-chart-panel.tar.gz'
},
expand: true,
cwd: 'dist/',
src: ['**/*']
}
}
})
Expand All @@ -107,6 +116,7 @@ module.exports = function (grunt) {
grunt.registerTask('build', [
'clean',
'default',
'compress'
'compress:main',
'compress:tar'
])
}
42 changes: 29 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ $ cd ./libre-downtime-pie-chart-panel
~/libre-downtime-pie-chart-panel
$ npm install
...
added 714 packages from 399 contributors and audited 719 packages in 11.871s
found 42 vulnerabilities (11 low, 6 moderate, 25 high)
run `npm audit fix` to fix them, or `npm audit` for details
added 622 packages in 13.118s
```

Install Grunt globally
Expand All @@ -95,20 +93,25 @@ Run grunt to build the panel

```shell
$ grunt

Running "copy:src_to_dist" (copy) task
Created 2 directories, copied 8 files
Created 2 directories, copied 3 files

Running "copy:libs" (copy) task
Running "copy:echarts_libs" (copy) task
Copied 1 file

Running "copy:pluginDef" (copy) task
Copied 1 file

Running "copy:image_to_dist" (copy) task
Running "copy:readme" (copy) task
Created 1 directory, copied 7 files

Running "string-replace:dist" (string-replace) task

1 files created

Running "babel:dist" (babel) task

Done, without errors.
Done.

```

Expand Down Expand Up @@ -147,13 +150,16 @@ Build panel and zip into archive
~/libre-downtime-pie-chart-panel
$ grunt build
Running "clean:0" (clean) task
>> 0 paths cleaned.
>> 1 path cleaned.

Running "clean:1" (clean) task
>> 0 paths cleaned.
>> 1 path cleaned.

Running "clean:2" (clean) task
>> 1 path cleaned.

Running "copy:src_to_dist" (copy) task
Created 2 directories, copied 2 files
Created 2 directories, copied 3 files

Running "copy:echarts_libs" (copy) task
Copied 1 file
Expand All @@ -171,9 +177,12 @@ Running "string-replace:dist" (string-replace) task
Running "babel:dist" (babel) task

Running "compress:main" (compress) task
>> Compressed 25 files.
>> Compressed 26 files.

Running "compress:tar" (compress) task
>> Compressed 26 files.

Done, without errors.
Done.

```

Expand All @@ -189,4 +198,11 @@ For any issue, there are fundamentally three ways an individual can contribute:

## Change log

- 1.0.1 Add tar build output
- Remove unused libraries
- Npm audit fix
- Add tar build output
- Update README shell outputs
- Bump revision

- 1.0.0 Initial Public Release
Loading

0 comments on commit 17ff1ef

Please sign in to comment.