Skip to content

Commit

Permalink
remove resources on npm run production to not include them in publish…
Browse files Browse the repository at this point in the history
…ed package
  • Loading branch information
EnzoBatistaU committed May 16, 2024
1 parent e6f776b commit ddd1754
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 6 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<div id="libraryContainerPlaceholder"></div>

<!-- The main library view compoment -->
<script src='./dist/build/librarie.js'></script>
<script src='./dist/librarie.js'></script>
<!-- uncomment to debug in IE11 (polyfill fetch and promise)
<script src="//cdn.jsdelivr.net/npm/[email protected]/js/browser/bluebird.min.js"></script>
<script src='https://unpkg.com/[email protected]/dist/fetch.umd.js'></script>
Expand Down
55 changes: 54 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dynamods/librariejs",
"version": "1.0.1",
"version": "1.0.4",
"description": "Project that contains all hosted contents of Dynamo Windows client",
"main": "index.js",
"scripts": {
Expand All @@ -10,7 +10,7 @@
"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/",
"production": "npm run bundle && npm run copy",
"production": "npm run bundle && npm run copy && rm -r dist/resources",
"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 Expand Up @@ -47,6 +47,7 @@
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.5",
"enzyme-to-json": "^3.6.1",
"file-loader": "^6.2.0",
"jest": "^29.6.4",
"jest-environment-jsdom": "^29.6.4",
"jest-junit": "^16.0.0",
Expand Down
5 changes: 3 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ module.exports = {
target: "web",
output: {
filename: productionBuild ? "librarie.min.js" : "librarie.js",
path: path.join(__dirname, '/dist/build'),
publicPath: "./dist/build/",
path: path.join(__dirname, '/dist/'),
publicPath: "./dist/",
libraryTarget: "umd",
library: "LibraryEntryPoint",
clean: true
},
optimization:{
minimize: !!productionBuild,
Expand Down

0 comments on commit ddd1754

Please sign in to comment.