|
1 | | -var fs = require('fs'); |
2 | | -var path = require('path'); |
3 | | -var RSVP = require('rsvp'); |
| 1 | +'use strict'; |
| 2 | + |
| 3 | +const fs = require('fs'); |
| 4 | +const path = require('path'); |
| 5 | +const RSVP = require('rsvp'); |
4 | 6 |
|
5 | 7 | module.exports = { |
6 | | - name: "fastboot-by-default", |
7 | | - description: "Install `ember fastboot` as `npm start`.", |
| 8 | + name: 'fastboot-by-default', |
| 9 | + description: 'Install `ember fastboot` as `npm start`.', |
8 | 10 |
|
9 | | - normalizeEntityName: function() { |
| 11 | + normalizeEntityName() { |
10 | 12 | // this prevents an error when the entityName is |
11 | 13 | // not specified (since that doesn't actually matter |
12 | 14 | // to us |
13 | 15 | }, |
14 | 16 |
|
15 | | - install: function(options) { |
16 | | - var project = options.project; |
17 | | - var packagePath = path.join(project.root, 'package.json'); |
18 | | - var contents = fs.readFileSync(packagePath, { encoding: 'utf8' }); |
19 | | - var pkg = JSON.parse(contents); |
| 17 | + install(options) { |
| 18 | + let project = options.project; |
| 19 | + let packagePath = path.join(project.root, 'package.json'); |
| 20 | + let contents = fs.readFileSync(packagePath, { encoding: 'utf8' }); |
| 21 | + let pkg = JSON.parse(contents); |
20 | 22 |
|
21 | 23 | pkg.scripts.start = 'ember fastboot --serve-assets'; |
22 | 24 |
|
23 | | - var newContents = JSON.stringify(pkg, null, 2); |
| 25 | + let newContents = JSON.stringify(pkg, null, 2); |
24 | 26 | fs.writeFileSync(packagePath, newContents, { encoding: 'utf8' }); |
25 | 27 |
|
26 | | - return RSVP.resolve(); |
| 28 | + return RSVP.Promise.resolve(); |
27 | 29 | } |
28 | 30 | }; |
0 commit comments