Skip to content
This repository was archived by the owner on Oct 17, 2020. It is now read-only.
Merged
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"build": "node scripts/build.js",
"check-deps": "node scripts/check-deps.js",
"ci": "yarn check-deps && yarn format:check && yarn lint && yarn build && yarn test",
"clean": "yarn workspaces run clean",
"format": "prettier --write \".*.ts\" \"packages/**/*.ts\"",
"format:check": "prettier --list-different \".*.ts\" \"packages/**/*.ts\"",
"level-deps": "node scripts/level-deps.js",
Expand Down
4 changes: 3 additions & 1 deletion packages/generator-liferay-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "generator-liferay-js",
"version": "3.0.0",
"description": "Yeoman generators for Liferay DXP and Portal CE JavaScript projects.",
"license": "LGPL-3.0",
"main": "generators/app/index.js",
"files": [
"generators"
Expand All @@ -12,8 +13,9 @@
"liferay-js"
],
"scripts": {
"copyfiles": "node ../../scripts/copyfiles.js",
"build": "tsc && yarn copyfiles",
"clean": "node ../../scripts/clean.js",
"copyfiles": "node ../../scripts/copyfiles.js",
"prepublish": "yarn build"
},
"devDependencies": {
Expand Down
4 changes: 3 additions & 1 deletion packages/liferay-npm-bridge-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
"name": "liferay-npm-bridge-generator",
"version": "3.0.0",
"description": "A CLI utility to generate module bridges (modules that re-export other modules).",
"license": "LGPL-3.0",
"bin": {
"liferay-npm-bridge-generator": "bin/liferay-npm-bridge-generator.js"
},
"scripts": {
"copyfiles": "node ../../scripts/copyfiles.js",
"build": "tsc && yarn copyfiles",
"clean": "node ../../scripts/clean.js",
"copyfiles": "node ../../scripts/copyfiles.js",
"prepublish": "yarn build"
},
"dependencies": {
Expand Down
4 changes: 3 additions & 1 deletion packages/liferay-npm-build-support/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "liferay-npm-build-support",
"version": "3.0.0",
"description": "A library of scripts and helpers used by generated projects in their build processes.",
"license": "LGPL-3.0",
"bin": {
"lnbs-build": "bin/lnbs-build.js",
"lnbs-copy-assets": "bin/lnbs-copy-assets.js",
Expand All @@ -11,8 +12,9 @@
"lnbs-translate": "bin/lnbs-translate.js"
},
"scripts": {
"copyfiles": "node ../../scripts/copyfiles.js",
"build": "tsc && yarn copyfiles",
"clean": "node ../../scripts/clean.js",
"copyfiles": "node ../../scripts/copyfiles.js",
"prepublish": "yarn build"
},
"dependencies": {
Expand Down
4 changes: 3 additions & 1 deletion packages/liferay-npm-build-tools-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
"name": "liferay-npm-build-tools-common",
"version": "3.0.0",
"description": "Utility library for Liferay NPM Build Tools.",
"license": "LGPL-3.0",
"scripts": {
"copyfiles": "node ../../scripts/copyfiles.js",
"build": "tsc && yarn copyfiles",
"clean": "node ../../scripts/clean.js",
"copyfiles": "node ../../scripts/copyfiles.js",
"prepublish": "node ../../scripts/disable-publish.js",
"release:snapshot": "node ../../scripts/release-snapshot.js"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
"name": "liferay-npm-bundler-loader-babel-loader",
"version": "3.0.0",
"description": "A liferay-npm-bundler loader that runs Babel on source files.",
"license": "LGPL-3.0",
"main": "lib/index.js",
"scripts": {
"copyfiles": "node ../../scripts/copyfiles.js",
"build": "tsc && yarn copyfiles",
"clean": "node ../../scripts/clean.js",
"copyfiles": "node ../../scripts/copyfiles.js",
"prepublish": "yarn build"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
"name": "liferay-npm-bundler-loader-copy-loader",
"version": "3.0.0",
"description": "A liferay-npm-bundler loader that copies files.",
"license": "LGPL-3.0",
"main": "lib/index.js",
"scripts": {
"copyfiles": "node ../../scripts/copyfiles.js",
"build": "tsc && yarn copyfiles",
"clean": "node ../../scripts/clean.js",
"copyfiles": "node ../../scripts/copyfiles.js",
"prepublish": "yarn build"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
"name": "liferay-npm-bundler-loader-css-loader",
"version": "3.0.0",
"description": "A liferay-npm-bundler loader that turns CSS files into JavaScript modules that inject a <link> into the HTML when they are required.",
"license": "LGPL-3.0",
"main": "lib/index.js",
"scripts": {
"copyfiles": "node ../../scripts/copyfiles.js",
"build": "tsc && yarn copyfiles",
"clean": "node ../../scripts/clean.js",
"copyfiles": "node ../../scripts/copyfiles.js",
"prepublish": "yarn build"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
"name": "liferay-npm-bundler-loader-json-loader",
"version": "3.0.0",
"description": "A liferay-npm-bundler loader that turns JSON files into JavaScript modules that export the parsed JSON object.",
"license": "LGPL-3.0",
"main": "lib/index.js",
"scripts": {
"copyfiles": "node ../../scripts/copyfiles.js",
"build": "tsc && yarn copyfiles",
"clean": "node ../../scripts/clean.js",
"copyfiles": "node ../../scripts/copyfiles.js",
"prepublish": "yarn build"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
"name": "liferay-npm-bundler-loader-sass-loader",
"version": "3.0.0",
"description": "A liferay-npm-bundler loader that runs `sass` or `node-sass` on source files.",
"license": "LGPL-3.0",
"main": "lib/index.js",
"scripts": {
"copyfiles": "node ../../scripts/copyfiles.js",
"build": "tsc && yarn copyfiles",
"clean": "node ../../scripts/clean.js",
"copyfiles": "node ../../scripts/copyfiles.js",
"prepublish": "yarn build"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
"name": "liferay-npm-bundler-loader-style-loader",
"version": "3.0.0",
"description": "A liferay-npm-bundler loader that turns CSS files into JavaScript modules that inject the CSS into the HTML when they are required.",
"license": "LGPL-3.0",
"main": "lib/index.js",
"scripts": {
"copyfiles": "node ../../scripts/copyfiles.js",
"build": "tsc && yarn copyfiles",
"clean": "node ../../scripts/clean.js",
"copyfiles": "node ../../scripts/copyfiles.js",
"prepublish": "yarn build"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
"name": "liferay-npm-bundler-preset-angular-cli",
"version": "3.0.0",
"description": "Configuration for liferay-npm-bundler to integrate with Angular CLI projects",
"license": "LGPL-3.0",
"main": "config.json",
"scripts": {
"clean": "node ../../scripts/clean.js"
},
"dependencies": {
"liferay-npm-build-support": "3.0.0",
"liferay-npm-bundler-loader-babel-loader": "3.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
"name": "liferay-npm-bundler-preset-create-react-app",
"version": "3.0.0",
"description": "Configuration for liferay-npm-bundler to integrate with create-react-app projects",
"license": "LGPL-3.0",
"main": "config.json",
"scripts": {
"clean": "node ../../scripts/clean.js"
},
"dependencies": {
"liferay-npm-bundler-loader-babel-loader": "3.0.0",
"liferay-npm-bundler-loader-copy-loader": "3.0.0"
Expand Down
6 changes: 5 additions & 1 deletion packages/liferay-npm-bundler-preset-standard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@
"name": "liferay-npm-bundler-preset-standard",
"version": "3.0.0",
"description": "Standard configuration for liferay-npm-bundler.",
"main": "config.json"
"license": "LGPL-3.0",
"main": "config.json",
"scripts": {
"clean": "node ../../scripts/clean.js"
}
}
4 changes: 4 additions & 0 deletions packages/liferay-npm-bundler-preset-vue-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
"name": "liferay-npm-bundler-preset-vue-cli",
"version": "3.0.0",
"description": "Configuration for liferay-npm-bundler to integrate with Vue CLI projects",
"license": "LGPL-3.0",
"main": "config.json",
"scripts": {
"clean": "node ../../scripts/clean.js"
},
"dependencies": {
"liferay-npm-build-support": "3.0.0",
"liferay-npm-bundler-loader-babel-loader": "3.0.0",
Expand Down
4 changes: 3 additions & 1 deletion packages/liferay-npm-bundler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
"name": "liferay-npm-bundler",
"version": "3.0.0",
"description": "A CLI utility to bundle NPM dependencies of a Liferay OSGi bundle.",
"license": "LGPL-3.0",
"main": "lib/index.js",
"bin": {
"liferay-npm-bundler": "bin/liferay-npm-bundler.js"
},
"scripts": {
"copyfiles": "node ../../scripts/copyfiles.js",
"build": "tsc && yarn copyfiles",
"clean": "node ../../scripts/clean.js",
"copyfiles": "node ../../scripts/copyfiles.js",
"prepublish": "node ../../scripts/disable-publish.js",
"release:snapshot": "node ../../scripts/release-snapshot.js"
},
Expand Down
4 changes: 3 additions & 1 deletion packages/liferay-npm-imports-checker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
"name": "liferay-npm-imports-checker",
"version": "3.0.0",
"description": "A CLI utility to check `imports` sections of `.npmbundlerrc` files in a multiproject source tree.",
"license": "LGPL-3.0",
"bin": {
"liferay-npm-imports-checker": "bin/liferay-npm-imports-checker.js"
},
"scripts": {
"copyfiles": "node ../../scripts/copyfiles.js",
"build": "tsc && yarn copyfiles",
"clean": "node ../../scripts/clean.js",
"copyfiles": "node ../../scripts/copyfiles.js",
"prepublish": "yarn build"
},
"dependencies": {
Expand Down
18 changes: 18 additions & 0 deletions scripts/clean.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* SPDX-FileCopyrightText: © 2020 Liferay, Inc. <https://liferay.com>
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

const fs = require('fs-extra');

try {
const json = fs.readJSONSync('tsconfig.json');

if (json.compilerOptions && json.compilerOptions.outDir) {
fs.removeSync(json.compilerOptions.outDir);
}
} catch (err) {
if (err.code !== 'ENOENT') {
throw err;
}
}