Skip to content

Commit

Permalink
Merge pull request #346 from oddbird/sass-modules
Browse files Browse the repository at this point in the history
Add support for Dart Sass
  • Loading branch information
jgerigmeyer authored Apr 24, 2020
2 parents dc32899 + bf27a68 commit a03e940
Show file tree
Hide file tree
Showing 37 changed files with 3,744 additions and 3,161 deletions.
1 change: 1 addition & 0 deletions .babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
{
modules: false,
useBuiltIns: 'usage',
corejs: '3',
exclude: ['transform-regenerator'],
},
],
Expand Down
88 changes: 30 additions & 58 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
version: 2
jobs:
version: 2.1

jobs:
build:
working_directory: ~/herman
docker:
- image: circleci/node:10-browsers
- image: circleci/node:latest-browsers
steps:
- checkout
- restore_cache:
keys:
- herman-yarn-{{ checksum "yarn.lock" }}
- herman-yarn-
- run:
name: Install Dependencies
command: yarn
- save_cache:
key: herman-yarn-{{ checksum "yarn.lock" }}
command: yarn install --frozen-lockfile
- persist_to_workspace:
root: .
paths:
- "~/.cache/yarn"
- ./node_modules
- save_cache:
key: herman-node-modules-{{ checksum "yarn.lock" }}
key: herman-yarn-{{ checksum "yarn.lock" }}
paths:
- "~/herman/node_modules"
- ./node_modules

build-node-6:
working_directory: ~/herman
Expand All @@ -32,88 +31,68 @@ jobs:
- restore_cache:
keys:
- herman-node6-{{ checksum "yarn.lock" }}
- herman-node6-
- run:
name: Install Dependencies
command: yarn
- save_cache:
key: herman-node6-{{ checksum "yarn.lock" }}
paths:
- "~/.cache/yarn"
command: yarn install --frozen-lockfile --ignore-engines
- save_cache:
key: herman-node6-modules-{{ checksum "yarn.lock" }}
paths:
- "~/herman/node_modules"
- ./node_modules

lint:
working_directory: ~/herman
docker:
- image: circleci/node:10-browsers
- image: circleci/node:latest-browsers
steps:
- checkout
- restore_cache:
keys:
- herman-node-modules-{{ checksum "yarn.lock" }}
- herman-node-modules-
- run:
name: Set $PATH
command: echo 'export PATH=~/herman/node_modules/.bin:$PATH' >> $BASH_ENV
- attach_workspace:
at: .
- run:
name: Lint JS
command: gulp eslint
command: yarn gulp eslint
- run:
name: Lint Sass
command: gulp sasslint
command: yarn gulp sasslint

test-sass:
working_directory: ~/herman
docker:
- image: circleci/node:10-browsers
- image: circleci/node:latest-browsers
steps:
- checkout
- restore_cache:
keys:
- herman-node-modules-{{ checksum "yarn.lock" }}
- herman-node-modules-
- run:
name: Set $PATH
command: echo 'export PATH=~/herman/node_modules/.bin:$PATH' >> $BASH_ENV
- attach_workspace:
at: .
- run:
name: Test Sass
command: gulp sasstest
command: yarn gulp sasstest

test-js:
working_directory: ~/herman
docker:
- image: circleci/node:10-browsers
- image: circleci/node:latest-browsers
steps:
- checkout
- restore_cache:
keys:
- herman-node-modules-{{ checksum "yarn.lock" }}
- herman-node-modules-
- run:
name: Set $PATH
command: echo 'export PATH=~/herman/node_modules/.bin:$PATH' >> $BASH_ENV
- attach_workspace:
at: .
- run:
name: Run JS Tests
command: gulp jstest
command: yarn gulp jstest
- run:
name: Run Client JS Tests
command: gulp clienttest
command: yarn gulp clienttest
- run:
name: Report Test Coverage
command: |
nyc report --reporter=text-lcov | coveralls
nyc report --reporter=text-lcov --temp-directory ./jscov/client/ | coveralls
yarn nyc report --reporter=text-lcov | yarn coveralls
yarn nyc report --reporter=text-lcov --temp-directory ./jscov/client/ | yarn coveralls
curl -k "https://coveralls.io/webhook?repo_token=${COVERALLS_REPO_TOKEN}" -d "payload[build_num]=${CIRCLE_BUILD_NUM}&payload[status]=done"
environment:
COVERALLS_PARALLEL: 'true'
- run:
name: Check Test Coverage
command: |
nyc check-coverage
nyc check-coverage --temp-directory ./jscov/client/
yarn nyc check-coverage
yarn nyc check-coverage --temp-directory ./jscov/client/
- store_artifacts:
path: jscov
destination: js-reports
Expand All @@ -129,16 +108,9 @@ jobs:
- restore_cache:
keys:
- herman-node6-modules-{{ checksum "yarn.lock" }}
- herman-node6-modules-
- run:
name: Set $PATH
command: echo 'export PATH=~/herman/node_modules/.bin:$PATH' >> $BASH_ENV
- run:
name: Run JS Tests [node 6]
command: gulp jstest
- run:
name: Check Test Coverage [node 6]
command: nyc check-coverage
command: yarn gulp jstest-node6
- store_artifacts:
path: jscov
destination: js-reports
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ npm-debug.log*
test/js/dest/
yarn-debug.log*
yarn-error.log*
.nvmrc

dist/webpack/app_styles.min.js
dist/webpack/styleguide_json*
Loading

0 comments on commit a03e940

Please sign in to comment.