Skip to content

Commit

Permalink
Removing dev dependencies from figma exporter when run in project
Browse files Browse the repository at this point in the history
  • Loading branch information
bradmering committed Mar 9, 2023
1 parent 4c0aa6c commit cf9bf4c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to
### Bugfixes

- Fixes a build issue with types on NextJS build
- Adds a npm script to run the installer for the figma exporter without dev deps

## [0.1.3] - 2023-03-09

Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,18 @@
"scripts": {
"start": "npm run dev",
"dev": "concurrently --timings -k -n svg-sprite,figma-exporter,nextjs \"npm run watch:svg-sprite\" \"cd figma-exporter && npx preconstruct watch\" \"npx next dev\"",
"install:lib": "cd figma-exporter && npm install",
"install:lib:no-dev": "cd figma-exporter && npm install --omit=dev",
"build:lib": "cd figma-exporter && npx preconstruct build",
"watch:svg-sprite": "node ./scripts/watch-svg-sprite.js",
"build:svg-sprite": "node ./scripts/build-svg-sprite.js",
"build:static": "npx next build && npx next export",
"fetch": "node ./figma-exporter/dist/figma-exporter.cjs.js && mv ./exported/*.zip ./public/",
"lint:sass": "stylelint \"sass/**/*.scss\"",
"lint": "npm run lint:sass && npx next lint",
"prepack": "npm run build:lib && npm run build:svg-sprite",
"prepack": "npm run install:lib && npm run build:lib && npm run build:svg-sprite",
"release": "np --any-branch",
"test": "npm run lint",
"postinstall": "cd figma-exporter && npm install --omit=dev"
"test": "npm run lint"
},
"prettier": {
"printWidth": 140,
Expand Down
5 changes: 5 additions & 0 deletions scripts/build/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@ const installNpmDependencies = async () => {
env: process.env,
stdio: 'inherit',
});
await spawnPromise('npm', ['run', 'install:lib:no-dev'], {
cwd: tmpDir,
env: process.env,
stdio: 'inherit',
});
};

/**
Expand Down

0 comments on commit cf9bf4c

Please sign in to comment.