Skip to content

Commit

Permalink
fix: remove bower_components before converting to P3 (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
Limon Monte authored Oct 26, 2018
1 parent d4a0451 commit 7b08be0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7,032 deletions.
4 changes: 3 additions & 1 deletion bin/magi-p3-convert
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const fs = require('fs');
const jsonfile = require('jsonfile');
const replace = require('replace-in-file');
const child_process = require('child_process');
const rimraf = require('rimraf');

function runSync(cmd) {
cmd = cmd.trim();
Expand Down Expand Up @@ -80,7 +81,8 @@ async function main() {
jsonfile.writeFileSync('bower.json', bowerJson, {spaces: 2});

runSync('git add bower.json');
runSync('bower up');
rimraf.sync('bower_components');
runSync('bower install');

// Try commit changes
try {
Expand Down
4 changes: 2 additions & 2 deletions bin/magi-release
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
'use strict';

const program = require('commander');
const readline = require('readline');
const fs = require('fs');
const rimraf = require('rimraf');

function info(msg) {
console.log(' [magi] 🌀 \x1b[36m%s\x1b[0m ...', msg);
Expand Down Expand Up @@ -130,7 +130,7 @@ async function main(version) {
done(`Release Already deployed in npm: ${npmUrl}`);
} else {
info('Converting to polymer 3');
await exe('npx rimraf node_modules');
rimraf.sync('node_modules');
await exe('magi p3-convert --out . --import-style=name');
done('Converted to Polymer 3')

Expand Down
Loading

0 comments on commit 7b08be0

Please sign in to comment.