File tree 6 files changed +63
-27
lines changed
6 files changed +63
-27
lines changed Original file line number Diff line number Diff line change @@ -98,11 +98,6 @@ module.exports = grunt => {
98
98
]
99
99
} ,
100
100
source : {
101
- // options: {
102
- // parserOptions: {
103
- // ecmaVersion: 8
104
- // }
105
- // },
106
101
src : [ 'src/**/*.js' ]
107
102
} ,
108
103
test : {
Original file line number Diff line number Diff line change 77
77
"omggif" : " ^1.0.10" ,
78
78
"open" : " ^7.0.3" ,
79
79
"opentype.js" : " ^0.9.0" ,
80
- "prettier " : " ^1.7.4 " ,
80
+ "pretty-fast " : " ^0.2.7 " ,
81
81
"promise-map-series" : " ^0.2.3" ,
82
82
"puppeteer" : " ^10.2.0" ,
83
83
"regenerator-runtime" : " ^0.13.3" ,
128
128
}
129
129
]
130
130
],
131
- "generatorOpts" : {
132
- "retainLines" : true
133
- },
134
131
"env" : {
135
132
"test" : {
136
133
"plugins" : [
Original file line number Diff line number Diff line change 4
4
5
5
import { resolve } from 'path' ;
6
6
import browserify from 'browserify' ;
7
- import { format } from 'prettier' ;
8
7
import derequire from 'derequire' ;
9
8
10
9
const bannerTemplate =
@@ -61,7 +60,9 @@ module.exports = function(grunt) {
61
60
browserified = browserified . exclude ( '../../translations/dev' ) ;
62
61
}
63
62
64
- const babelifyOpts = { global : true } ;
63
+ const babelifyOpts = {
64
+ global : true
65
+ } ;
65
66
66
67
if ( isTest ) {
67
68
babelifyOpts . envName = 'test' ;
@@ -95,10 +96,11 @@ module.exports = function(grunt) {
95
96
96
97
// and prettify the code
97
98
if ( ! isMin ) {
98
- code = format ( code , {
99
- singleQuote : true ,
100
- printWidth : 80 + 12
101
- } ) ;
99
+ const prettyFast = require ( 'pretty-fast' ) ;
100
+ code = prettyFast ( code , {
101
+ url : '(anonymous)' ,
102
+ indent : ' '
103
+ } ) . code ;
102
104
}
103
105
104
106
// finally, write it to disk
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ const fs = require('fs');
6
6
const path = require ( 'path' ) ;
7
7
const browserify = require ( 'browserify' ) ;
8
8
const derequire = require ( 'derequire' ) ;
9
- const { format } = require ( 'prettier' ) ;
10
9
11
10
module . exports = function ( grunt ) {
12
11
const tempFilePath = path . resolve ( './src/customApp.js' ) ;
@@ -86,10 +85,11 @@ module.exports = function(grunt) {
86
85
87
86
// and prettify the code
88
87
if ( ! isMin ) {
89
- code = format ( code , {
90
- singleQuote : true ,
91
- printWidth : 80 + 12
92
- } ) ;
88
+ const prettyFast = require ( 'pretty-fast' ) ;
89
+ code = prettyFast ( code , {
90
+ url : '(anonymous)' ,
91
+ indent : ' '
92
+ } ) . code ;
93
93
}
94
94
95
95
// finally, write it to disk and remove the temp file
Original file line number Diff line number Diff line change @@ -46,7 +46,6 @@ module.exports = grunt => {
46
46
) ;
47
47
}
48
48
49
- // return report.errorCount === 0;
50
49
done ( report . errorCount === 0 ) ;
51
50
}
52
51
) ;
You can’t perform that action at this time.
0 commit comments