Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@18f/identity-build-sass

Package Overview
Dependencies
Maintainers
6
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@18f/identity-build-sass - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

get-default-load-paths.js

21

cli.js

@@ -7,3 +7,5 @@ #!/usr/bin/env node

import { fileURLToPath } from 'url';
import { parseArgs } from '@pkgjs/parseargs'; // Note: Use native util.parseArgs after Node v18
import { buildFile } from './index.js';
import getDefaultLoadPaths from './get-default-load-paths.js';
import getErrorSassStackPaths from './get-error-sass-stack-paths.js';

@@ -18,11 +20,14 @@

const args = process.argv.slice(2);
const fileArgs = args.filter((arg) => !arg.startsWith('-'));
const flags = args.filter((arg) => arg.startsWith('-'));
const { values: flags, positionals: fileArgs } = parseArgs({
allowPositionals: true,
options: {
watch: { type: 'boolean' },
'out-dir': { type: 'string' },
'load-path': { type: 'string', multiple: true, default: [] },
},
});
const isWatching = flags.includes('--watch');
const outDir = flags.find((flag) => flag.startsWith('--out-dir='))?.slice(10);
const loadPaths = flags
.filter((flag) => flag.startsWith('--load-path='))
.map((flag) => flag.slice(12));
const isWatching = flags.watch;
const outDir = flags['out-dir'];
const loadPaths = [...getDefaultLoadPaths(), ...flags['load-path']];

@@ -29,0 +34,0 @@ /** @type {BuildOptions & SyncSassOptions} */

@@ -7,4 +7,4 @@ /**

* getErrorSassStackPaths(
* 'node_modules/identity-style-guide/dist/assets/scss/uswds/core/_functions.scss 35:8 divide()\n' +
* 'node_modules/identity-style-guide/dist/assets/scss/uswds/core/mixins/_icon.scss 77:12 add-color-icon()\n' +
* 'node_modules/@18f/identity-design-system/dist/assets/scss/uswds/core/_functions.scss 35:8 divide()\n' +
* 'node_modules/@18f/identity-design-system/dist/assets/scss/uswds/core/mixins/_icon.scss 77:12 add-color-icon()\n' +
* 'app/assets/stylesheets/components/_alert.scss 13:5 @import\n' +

@@ -15,4 +15,4 @@ * 'app/assets/stylesheets/components/all.scss 3:9 @import\n' +

* // [
* // 'node_modules/identity-style-guide/dist/assets/scss/uswds/core/_functions.scss',
* // 'node_modules/identity-style-guide/dist/assets/scss/uswds/core/mixins/_icon.scss',
* // 'node_modules/@18f/identity-design-system/dist/assets/scss/uswds/core/_functions.scss',
* // 'node_modules/@18f/identity-design-system/dist/assets/scss/uswds/core/mixins/_icon.scss',
* // 'app/assets/stylesheets/components/_alert.scss',

@@ -19,0 +19,0 @@ * // 'app/assets/stylesheets/components/all.scss',

{
"name": "@18f/identity-build-sass",
"version": "1.1.0",
"version": "1.2.0",
"private": false,

@@ -18,2 +18,3 @@ "description": "Stylesheet compilation utility with reasonable defaults and fast performance.",

"cli.js",
"get-default-load-paths.js",
"get-error-sass-stack-paths.js"

@@ -27,2 +28,4 @@ ],

"dependencies": {
"@aduth/is-dependency": "^1.0.0",
"@pkgjs/parseargs": "^0.11.0",
"browserslist": "^4.21.5",

@@ -29,0 +32,0 @@ "chokidar": "^3.5.3",

@@ -17,2 +17,3 @@ # `@18f/identity-build-sass`

- Output filenames derived from the input filenames (`main.css.scss` becomes `main.css`).
- Automatically adds required load paths for `@18f/identity-design-system` and `@uswds/uswds`.

@@ -26,3 +27,3 @@ ## Usage

```
npx build-sass path/to/sass/*.css.scss --out-dir=build --load-path=node_modules/@uswds/uswds/packages
npx build-sass path/to/sass/*.css.scss --out-dir=build
```

@@ -29,0 +30,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc