Add dart tests

This commit is contained in:
Jeremy Thomas 2020-11-07 11:50:37 +00:00
parent a6130bf160
commit b07a04fb35
3 changed files with 91 additions and 6 deletions

View File

@ -1,6 +1,12 @@
script:
- "test/sass-compile-tester.sh"
language: sass
before_install:
- gem install sass
matrix:
include:
- language: sass
before_install:
- gem install sass
script:
- test/ruby-sass.sh
- language: node_js
before_install:
- npm i -g sass
script:
- node test/dart-sass.js

79
test/dart-sass.js Normal file
View File

@ -0,0 +1,79 @@
const sass = require('sass');
const sources = [
`base/animations.sass`,
`base/generic.sass`,
`base/minireset.sass`,
`components/breadcrumb.sass`,
`components/card.sass`,
`components/dropdown.sass`,
`components/level.sass`,
`components/media.sass`,
`components/menu.sass`,
`components/message.sass`,
`components/modal.sass`,
`components/navbar.sass`,
`components/pagination.sass`,
`components/panel.sass`,
`components/tabs.sass`,
`elements/box.sass`,
`elements/button.sass`,
`elements/container.sass`,
`elements/content.sass`,
`elements/icon.sass`,
`elements/image.sass`,
`elements/notification.sass`,
`elements/other.sass`,
`elements/progress.sass`,
`elements/table.sass`,
`elements/tag.sass`,
`elements/title.sass`,
`form/checkbox-radio.sass`,
`form/file.sass`,
`form/input-textarea.sass`,
`form/select.sass`,
`form/tools.sass`,
`grid/columns.sass`,
`grid/tiles.sass`,
`helpers/color.sass`,
`helpers/flexbox.sass`,
`helpers/float.sass`,
`helpers/other.sass`,
`helpers/overflow.sass`,
`helpers/position.sass`,
`helpers/spacing.sass`,
`helpers/typography.sass`,
`helpers/visibility.sass`,
`layout/footer.sass`,
`layout/hero.sass`,
`layout/section.sass`,
`utilities/controls.sass`,
`utilities/derived-variables.sass`,
`utilities/functions.sass`,
`utilities/initial-variables.sass`,
`utilities/mixins.sass`,
];
const BULMA_SASS_PATH = `./sass/`;
sources.forEach(source => {
const result = sass.renderSync({
data: `@use "${BULMA_SASS_PATH}${source}";`,
outputStyle: "expanded"
});
try {
sass.renderSync({
data: `@use "${BULMA_SASS_PATH}${source}";`,
});
} catch(err) {
console.error(err);
}
});