Skip to content

Commit

Permalink
make fe-brary an optional dep so non-Domain users can run
Browse files Browse the repository at this point in the history
  • Loading branch information
albertstill committed Jan 6, 2020
1 parent f175da5 commit 7ac014d
Show file tree
Hide file tree
Showing 6 changed files with 6,438 additions and 4,537 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
example
fe-co-example
yarn-error.log
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ There are two parts to this repo, the Sass part and the JavaScript part.
### Sass

This contains most of the heavy lifting, give it a glob of .scss files, it will parse them into a
PostCSS AST and generate an Emotion JS file. To use, clone the repo and execute index.js like so:
PostCSS AST and generate an Emotion JS file. To use, clone the repo, run `npm install` and
execute index.js like so:
```sh
../sass-to-emotion/index.js ./src/scss/**/*.scss
```

Please note `yarn install` will not work for users outside of Domain because
it handles the package.json `optional` dependencies differently to npm
and will error for a private package we use for internal transforms.

![Sass to JS example](https://media.giphy.com/media/82oklJW3X4lQx9show/giphy.gif)

For example an input file `foo.scss`:
Expand Down Expand Up @@ -141,7 +146,7 @@ Clone this repo and link to the transform at `sass-to-emotion/jscodeshift` when
For example:

```sh
yarn global add jscodeshift
npm install -g jscodeshift
jscodeshift --parser flow -t ../sass-to-emotion/jscodeshift.js ./src/js
```

Expand Down
Loading

0 comments on commit 7ac014d

Please sign in to comment.