@makano/rew 1.2.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -243,6 +243,7 @@ yargs(hideBin(process.argv))
243
243
  describe: 'Package of the app to uninstall',
244
244
  type: 'string',
245
245
  }).option('all', {
246
+ alias: 'a',
246
247
  describe: 'Remove the configs as well',
247
248
  type: 'boolean',
248
249
  });
@@ -310,6 +311,11 @@ yargs(hideBin(process.argv))
310
311
  describe: 'Translate to js',
311
312
  type: 'boolean',
312
313
  })
314
+ .option('single', {
315
+ alias: 's',
316
+ describe: 'Build single file(don\'t build imports)',
317
+ type: 'boolean',
318
+ })
313
319
  .option('remove', {
314
320
  alias: 'r',
315
321
  describe: 'Remove all coffee',
@@ -181,6 +181,14 @@ module.exports = {
181
181
  file: path.join(installPath, c.install.build.file)
182
182
  });
183
183
  }
184
+ if(c.install.commands){
185
+ for(let command of c.install.commands){
186
+ execSync(command.replace(/\$installPath/g, installPath));
187
+ }
188
+ }
189
+ if(c.install.file){
190
+ run(path.join(installPath, c.install.file));
191
+ }
184
192
  }
185
193
  rl.close();
186
194
  } else {
@@ -236,7 +244,7 @@ module.exports = {
236
244
 
237
245
  function processFile(filePath, importsArray) {
238
246
  const content = readFile(filePath);
239
- const imports = extractImports(content);
247
+ const imports = argv.single ? [] : extractImports(content);
240
248
 
241
249
  imports.forEach((importStatement) => {
242
250
  const importedFilePath = path.resolve(path.dirname(filePath), importStatement.url);
@@ -361,7 +369,7 @@ module.exports = {
361
369
  if(json.packages) Object.keys(json.packages).forEach(name => log(name)) || log(`${Object.keys(json.packages).length} Packages in ${key}`, ':end');
362
370
  else log('None'.blue, ':end')
363
371
  } else {
364
- console.log(Object.keys(repos).join('\n'));
372
+ console.log(Object.keys(confInstance.getAll()).join('\n'));
365
373
  }
366
374
  } else if (command === 'delete') {
367
375
  confInstance.remove('repos');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makano/rew",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "A simple coffescript runtime and app manager",
5
5
  "main": "lib/rew/main.js",
6
6
  "directories": {