Skip to content

Commit

Permalink
[DYN-6769] Add npm scripts preparing package to be publish (#219)
Browse files Browse the repository at this point in the history
* add npm scripts to copy package.json, README.md and licenses to /dist

* remove BundleAnalyzerPlugin commented statements

---------

Co-authored-by: enzo707 <[email protected]>
  • Loading branch information
Enzo707 and EnzoBatistaU authored Apr 1, 2024
1 parent 9c895fb commit 6dc0add
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
"scripts": {
"test": "jest --coverage",
"utiltest": "mocha -r ts-node/register __tests__/mochatest/libraryUtilitiesTest.ts --reporter mocha-junit-reporter --reporter-options mochaFile=./TestResults/MochaReport.xml",
"build": "npm run prod",
"dev": "cross-env NODE_ENV=development webpack",
"prod": "cross-env NODE_ENV=production webpack",
"build": "cross-env NODE_ENV=production --mode=development webpack",
"bundle": "cross-env NODE_ENV=production --mode=production webpack",
"copy": "cp package.json dist/ && cp README.md dist/ && cp -r license_output dist/",
"prod": "npm run bundle && npm run copy",
"serve": "npm run dev & node ./index.js",
"lic_direct": "npx @adsk/adsk-npm-license-puller --path . --app-name 'librarieJS' --verbose --about-box ./license_output/about-box_direct.html --about-box-type desktop --year 2022 --paos ./license_output/paos_direct.csv",
"lic_transitive": "npx @adsk/adsk-npm-license-puller --path . --app-name 'librarieJS' --verbose --about-box ./license_output/about-box_transitive.html --about-box-type desktop --transitive --year 2022 --paos ./license_output/paos_transitive.csv",
Expand Down
5 changes: 1 addition & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
"use strict";
const webpack = require('webpack');
const TerserPlugin = require("terser-webpack-plugin");
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const path = require('path');
let productionBuild = (process.env.NODE_ENV == "production");
const productionBuild = (process.env.NODE_ENV == "production");
let plugins = [];

plugins.push(
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
}),
//uncomment to analyze what is bundled.
//new BundleAnalyzerPlugin(),
);


Expand Down

0 comments on commit 6dc0add

Please sign in to comment.