mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-19 17:14:40 +00:00
refactor(@embark/): move embark-reset to embark package
This commit is contained in:
parent
f7e226fdd4
commit
67d78151bb
@ -21,7 +21,6 @@
|
|||||||
"clean": "npm run reset",
|
"clean": "npm run reset",
|
||||||
"package": "npm pack",
|
"package": "npm pack",
|
||||||
"qa": "npm-run-all test package",
|
"qa": "npm-run-all test package",
|
||||||
"reset": "npx embark-reset && npx rimraf embark-*.tgz package",
|
|
||||||
"test": "npx embark test"
|
"test": "npx embark test"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
@ -34,7 +33,6 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"embark": "^4.1.1",
|
"embark": "^4.1.1",
|
||||||
"embark-reset": "^4.1.1",
|
|
||||||
"npm-run-all": "4.1.5",
|
"npm-run-all": "4.1.5",
|
||||||
"rimraf": "3.0.0"
|
"rimraf": "3.0.0"
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
"clean": "npm run reset",
|
"clean": "npm run reset",
|
||||||
"package": "npm pack",
|
"package": "npm pack",
|
||||||
"qa": "npm-run-all test package",
|
"qa": "npm-run-all test package",
|
||||||
"reset": "npx embark-reset && npx rimraf embark-*.tgz package",
|
|
||||||
"test": "npx embark test"
|
"test": "npx embark test"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
@ -36,7 +35,6 @@
|
|||||||
"bootstrap": "4.3.1",
|
"bootstrap": "4.3.1",
|
||||||
"classnames": "2.2.6",
|
"classnames": "2.2.6",
|
||||||
"embark": "^4.1.1",
|
"embark": "^4.1.1",
|
||||||
"embark-reset": "^4.1.1",
|
|
||||||
"npm-run-all": "4.1.5",
|
"npm-run-all": "4.1.5",
|
||||||
"react": "16.9.0",
|
"react": "16.9.0",
|
||||||
"react-dom": "16.9.0",
|
"react-dom": "16.9.0",
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
"clean": "npm run reset",
|
"clean": "npm run reset",
|
||||||
"package": "npm pack",
|
"package": "npm pack",
|
||||||
"qa": "npm-run-all test package",
|
"qa": "npm-run-all test package",
|
||||||
"reset": "npx embark-reset && npx rimraf embark-*.tgz package",
|
|
||||||
"test": "npx embark test"
|
"test": "npx embark test"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
@ -30,7 +29,6 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"embark": "^4.1.1",
|
"embark": "^4.1.1",
|
||||||
"embark-reset": "^4.1.1",
|
|
||||||
"npm-run-all": "4.1.5",
|
"npm-run-all": "4.1.5",
|
||||||
"rimraf": "3.0.0"
|
"rimraf": "3.0.0"
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
"embark": "^4.1.1",
|
"embark": "^4.1.1",
|
||||||
"embark-dapp-test-service": "^4.0.0",
|
"embark-dapp-test-service": "^4.0.0",
|
||||||
"embark-i18n": "^4.1.1",
|
"embark-i18n": "^4.1.1",
|
||||||
"embark-reset": "^4.1.1",
|
|
||||||
"fs-extra": "7.0.1",
|
"fs-extra": "7.0.1",
|
||||||
"haml": "0.4.3",
|
"haml": "0.4.3",
|
||||||
"jquery": "3.4.0",
|
"jquery": "3.4.0",
|
||||||
@ -21,7 +20,6 @@
|
|||||||
"ci": "npm run qa",
|
"ci": "npm run qa",
|
||||||
"clean": "npm run reset",
|
"clean": "npm run reset",
|
||||||
"qa": "npm run test",
|
"qa": "npm run test",
|
||||||
"reset": "npx embark-reset",
|
|
||||||
"test": "npx embark test"
|
"test": "npx embark test"
|
||||||
},
|
},
|
||||||
"version": "4.1.1"
|
"version": "4.1.1"
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
{
|
{
|
||||||
"description": "Test DApp for integration testing purposes",
|
"description": "Test DApp for integration testing purposes",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"embark": "^4.1.1",
|
"embark": "^4.1.1"
|
||||||
"embark-reset": "^4.1.1"
|
|
||||||
},
|
},
|
||||||
"name": "embark-dapp-test-contracts",
|
"name": "embark-dapp-test-contracts",
|
||||||
"private": true,
|
"private": true,
|
||||||
@ -10,7 +9,6 @@
|
|||||||
"ci": "npm run qa",
|
"ci": "npm run qa",
|
||||||
"clean": "npm run reset",
|
"clean": "npm run reset",
|
||||||
"qa": "npm run test",
|
"qa": "npm run test",
|
||||||
"reset": "npx embark-reset",
|
|
||||||
"test": "npx embark test"
|
"test": "npx embark test"
|
||||||
},
|
},
|
||||||
"version": "4.1.1"
|
"version": "4.1.1"
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
engine-strict = true
|
|
||||||
package-lock = false
|
|
||||||
save-exact = true
|
|
||||||
scripts-prepend-node-path = true
|
|
@ -1,52 +0,0 @@
|
|||||||
# Change Log
|
|
||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
||||||
|
|
||||||
## [4.1.1](https://github.com/embark-framework/embark/compare/v4.1.0...v4.1.1) (2019-08-28)
|
|
||||||
|
|
||||||
**Note:** Version bump only for package embark-reset
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [4.1.0](https://github.com/embark-framework/embark/compare/v4.1.0-beta.6...v4.1.0) (2019-08-12)
|
|
||||||
|
|
||||||
**Note:** Version bump only for package embark-reset
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [4.1.0-beta.3](https://github.com/embark-framework/embark/compare/v4.1.0-beta.2...v4.1.0-beta.3) (2019-06-07)
|
|
||||||
|
|
||||||
**Note:** Version bump only for package embark-reset
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [4.1.0-beta.0](https://github.com/embark-framework/embark/compare/v4.0.0...v4.1.0-beta.0) (2019-04-17)
|
|
||||||
|
|
||||||
**Note:** Version bump only for package embark-reset
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [4.0.0](https://github.com/embark-framework/embark/compare/v4.0.0-beta.2...v4.0.0) (2019-03-18)
|
|
||||||
|
|
||||||
**Note:** Version bump only for package embark-reset
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [4.0.0-beta.1](https://github.com/embark-framework/embark/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2019-03-18)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* add repository.directory field to package.json ([a9c5e1a](https://github.com/embark-framework/embark/commit/a9c5e1a))
|
|
||||||
* normalize README and package.json bugs, homepage, description ([5418f16](https://github.com/embark-framework/embark/commit/5418f16))
|
|
@ -1,6 +0,0 @@
|
|||||||
# `embark-reset`
|
|
||||||
|
|
||||||
> DApp reset utlity for Embark
|
|
||||||
|
|
||||||
Visit [embark.status.im](https://embark.status.im/) to get started with
|
|
||||||
[Embark](https://github.com/embark-framework/embark).
|
|
@ -1,5 +0,0 @@
|
|||||||
#!/usr/bin/env node
|
|
||||||
|
|
||||||
/* global module require */
|
|
||||||
|
|
||||||
require('./').reset();
|
|
@ -1,28 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "embark-reset",
|
|
||||||
"version": "4.1.1",
|
|
||||||
"author": "Iuri Matias <iuri.matias@gmail.com>",
|
|
||||||
"contributors": [],
|
|
||||||
"description": "DApp reset utlity for Embark",
|
|
||||||
"homepage": "https://github.com/embark-framework/embark/tree/master/packages/embark-reset#readme",
|
|
||||||
"bugs": "https://github.com/embark-framework/embark/issues",
|
|
||||||
"license": "MIT",
|
|
||||||
"repository": {
|
|
||||||
"directory": "packages/embark-reset",
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/embark-framework/embark.git"
|
|
||||||
},
|
|
||||||
"bin": "./bin.js",
|
|
||||||
"main": "index.js",
|
|
||||||
"files": [
|
|
||||||
"bin.js"
|
|
||||||
],
|
|
||||||
"dependencies": {
|
|
||||||
"rimraf": "3.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8.12.0 <12.0.0",
|
|
||||||
"npm": ">=6.4.1",
|
|
||||||
"yarn": ">=1.12.3"
|
|
||||||
}
|
|
||||||
}
|
|
@ -116,7 +116,6 @@
|
|||||||
"embark-process-logs-api-manager": "^4.1.1",
|
"embark-process-logs-api-manager": "^4.1.1",
|
||||||
"embark-profiler": "^4.1.1",
|
"embark-profiler": "^4.1.1",
|
||||||
"embark-proxy": "^4.1.1",
|
"embark-proxy": "^4.1.1",
|
||||||
"embark-reset": "^4.1.1",
|
|
||||||
"embark-scaffolding": "^4.1.1",
|
"embark-scaffolding": "^4.1.1",
|
||||||
"embark-solidity": "^4.1.1",
|
"embark-solidity": "^4.1.1",
|
||||||
"embark-specialconfigs": "^4.1.1",
|
"embark-specialconfigs": "^4.1.1",
|
||||||
|
@ -4,7 +4,7 @@ import findUp from 'find-up';
|
|||||||
let async = require('async');
|
let async = require('async');
|
||||||
const constants = require('embark-core/constants');
|
const constants = require('embark-core/constants');
|
||||||
const Logger = require('embark-logger');
|
const Logger = require('embark-logger');
|
||||||
const {reset: embarkReset, paths: defaultResetPaths} = require('embark-reset');
|
const {reset: embarkReset, paths: defaultResetPaths} = require('./reset');
|
||||||
const fs = require('../lib/core/fs.js');
|
const fs = require('../lib/core/fs.js');
|
||||||
const cloneDeep = require('clone-deep');
|
const cloneDeep = require('clone-deep');
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ const dappPath = process.env.DAPP_PATH || process.cwd();
|
|||||||
|
|
||||||
const green = (text) => '\x1b[32m' + text + '\x1b[0m';
|
const green = (text) => '\x1b[32m' + text + '\x1b[0m';
|
||||||
|
|
||||||
exports.paths = new Set([
|
const removePaths = new Set([
|
||||||
'.embark',
|
'.embark',
|
||||||
'chains.json',
|
'chains.json',
|
||||||
'coverage',
|
'coverage',
|
||||||
@ -17,10 +17,7 @@ exports.paths = new Set([
|
|||||||
'node_modules/.cache'
|
'node_modules/.cache'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
exports.reset = async ({
|
async function reset() {
|
||||||
doneMessage = green('Done!'),
|
|
||||||
removePaths = exports.paths
|
|
||||||
} = {}) => {
|
|
||||||
const completePaths = [...removePaths].map(relative => join(dappPath, relative));
|
const completePaths = [...removePaths].map(relative => join(dappPath, relative));
|
||||||
|
|
||||||
console.log(green('Removing the following files:\n'));
|
console.log(green('Removing the following files:\n'));
|
||||||
@ -28,5 +25,11 @@ exports.reset = async ({
|
|||||||
await Promise.all(
|
await Promise.all(
|
||||||
completePaths.map(path => rimraf(path))
|
completePaths.map(path => rimraf(path))
|
||||||
);
|
);
|
||||||
|
let doneMessage = green('Done!');
|
||||||
console.log(`\n${doneMessage}`);
|
console.log(`\n${doneMessage}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
paths: removePaths,
|
||||||
|
reset
|
||||||
|
};
|
@ -178,7 +178,6 @@ class TemplateGenerator {
|
|||||||
}
|
}
|
||||||
if (pkgJson.devDependencies) {
|
if (pkgJson.devDependencies) {
|
||||||
delete pkgJson.devDependencies['embark'];
|
delete pkgJson.devDependencies['embark'];
|
||||||
delete pkgJson.devDependencies['embark-reset'];
|
|
||||||
delete pkgJson.devDependencies['npm-run-all'];
|
delete pkgJson.devDependencies['npm-run-all'];
|
||||||
delete pkgJson.devDependencies['rimraf'];
|
delete pkgJson.devDependencies['rimraf'];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user