Repository: aexmachina/ember-cli-sass Branch: master Commit: 9fa7c7348179 Files: 44 Total size: 31.4 KB Directory structure: gitextract_x9o3wg_o/ ├── .editorconfig ├── .ember-cli ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .npmignore ├── .travis.yml ├── .watchmanconfig ├── CHANGELOG.md ├── LICENSE.md ├── README.md ├── RELEASE.md ├── app/ │ └── .gitkeep ├── blueprints/ │ └── ember-cli-sass/ │ └── index.js ├── config/ │ ├── ember-try.js │ └── environment.js ├── ember-cli-build.js ├── index.js ├── package.json ├── testem.js ├── tests/ │ ├── .eslintrc.js │ ├── acceptance/ │ │ └── app-test.js │ ├── dummy/ │ │ ├── app/ │ │ │ ├── app.js │ │ │ ├── components/ │ │ │ │ └── .gitkeep │ │ │ ├── controllers/ │ │ │ │ └── .gitkeep │ │ │ ├── helpers/ │ │ │ │ └── .gitkeep │ │ │ ├── index.html │ │ │ ├── models/ │ │ │ │ └── .gitkeep │ │ │ ├── resolver.js │ │ │ ├── router.js │ │ │ ├── routes/ │ │ │ │ └── .gitkeep │ │ │ ├── styles/ │ │ │ │ ├── app.scss │ │ │ │ └── output-path.scss │ │ │ └── templates/ │ │ │ ├── .gitkeep │ │ │ └── application.hbs │ │ ├── config/ │ │ │ ├── environment.js │ │ │ └── targets.js │ │ └── public/ │ │ ├── crossdomain.xml │ │ └── robots.txt │ ├── helpers/ │ │ └── .gitkeep │ ├── index.html │ ├── integration/ │ │ └── .gitkeep │ └── test-helper.js └── vendor/ └── .gitkeep ================================================ FILE CONTENTS ================================================ ================================================ FILE: .editorconfig ================================================ # EditorConfig helps developers define and maintain consistent # coding styles between different editors and IDEs # editorconfig.org root = true [*] end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true indent_style = space indent_size = 2 [*.hbs] insert_final_newline = false [*.{diff,md}] trim_trailing_whitespace = false ================================================ FILE: .ember-cli ================================================ { /** Ember CLI sends analytics information by default. The data is completely anonymous, but there are times when you might want to disable this behavior. Setting `disableAnalytics` to true will prevent any data from being sent. */ "disableAnalytics": false } ================================================ FILE: .eslintignore ================================================ # unconventional js /blueprints/*/files/ /vendor/ # compiled output /dist/ /tmp/ # misc /coverage/ # ember-try /.node_modules.ember-try/ ================================================ FILE: .eslintrc.js ================================================ module.exports = { root: true, parserOptions: { ecmaVersion: 2017, sourceType: 'module' }, plugins: [ 'ember' ], extends: [ 'eslint:recommended', 'plugin:ember/recommended' ], env: { browser: true }, rules: { }, overrides: [ // node files { files: [ 'ember-cli-build.js', 'index.js', 'testem.js', 'blueprints/*/index.js', 'config/**/*.js', 'tests/dummy/config/**/*.js' ], excludedFiles: [ 'addon/**', 'addon-test-support/**', 'app/**', 'tests/dummy/app/**' ], parserOptions: { sourceType: 'script', ecmaVersion: 2015 }, env: { browser: false, node: true }, plugins: ['node'], rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, { // add your custom rules and overrides for node files here }) } ] }; ================================================ FILE: .gitignore ================================================ # See https://help.github.com/ignore-files/ for more about ignoring files. # compiled output /dist/ /tmp/ # dependencies /node_modules/ # misc /.sass-cache /connect.lock /coverage/ /libpeerconnection.log /npm-debug.log* /testem.log /yarn-error.log /.idea # ember-try /.node_modules.ember-try/ /package.json.ember-try ================================================ FILE: .npmignore ================================================ /config/ember-try.js /dist /tests /tmp **/.gitkeep .editorconfig .ember-cli .gitignore .eslintrc.js .watchmanconfig .travis.yml ember-cli-build.js testem.js .idea yarn.lock # ember-try .node_modules.ember-try/ package.json.ember-try ================================================ FILE: .travis.yml ================================================ --- language: node_js node_js: # we recommend testing addons with the same minimum supported node version as Ember CLI # so that your addon works for all apps - "10" - "12" sudo: false dist: trusty addons: chrome: stable cache: directories: - $HOME/.npm - $HOME/.cache # includes bowers cache env: global: # See https://git.io/vdao3 for details. - JOBS=1 matrix: # we recommend new addons test the current and previous LTS # as well as latest stable release (bonus points to beta/canary) - EMBER_TRY_SCENARIO=ember-release - EMBER_TRY_SCENARIO=ember-beta - EMBER_TRY_SCENARIO=ember-canary - EMBER_TRY_SCENARIO=ember-default matrix: fast_finish: true allow_failures: - env: EMBER_TRY_SCENARIO=ember-canary before_install: - npm config set spin false - npm install -g npm@4 - npm --version install: - npm install script: - npm run lint:js # Usually, it's ok to finish the test scenario without reverting # to the addon's original dependency state, skipping "cleanup". - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup ================================================ FILE: .watchmanconfig ================================================ { "ignore_dirs": ["tmp", "dist"] } ================================================ FILE: CHANGELOG.md ================================================ # Changelog ## v11.0.1 (2022-04-26) #### :house: Internal - [#221](https://github.com/adopted-ember-addons/ember-cli-sass/pull/221) chore: remove usage of bower ([@knownasilya](https://github.com/knownasilya)) - [#227](https://github.com/adopted-ember-addons/ember-cli-sass/pull/227) Bump tmpl from 1.0.4 to 1.0.5 ([@dependabot[bot]](https://github.com/apps/dependabot)) - [#226](https://github.com/adopted-ember-addons/ember-cli-sass/pull/226) Bump tar from 4.4.1 to 4.4.19 ([@dependabot[bot]](https://github.com/apps/dependabot)) - [#225](https://github.com/adopted-ember-addons/ember-cli-sass/pull/225) Bump mout from 1.1.0 to 1.2.3 ([@dependabot[bot]](https://github.com/apps/dependabot)) - [#224](https://github.com/adopted-ember-addons/ember-cli-sass/pull/224) Bump lodash from 4.17.10 to 4.17.21 ([@dependabot[bot]](https://github.com/apps/dependabot)) - [#223](https://github.com/adopted-ember-addons/ember-cli-sass/pull/223) Bump follow-redirects from 1.5.8 to 1.14.9 ([@dependabot[bot]](https://github.com/apps/dependabot)) - [#222](https://github.com/adopted-ember-addons/ember-cli-sass/pull/222) chore: add release-it and release v11 ([@knownasilya](https://github.com/knownasilya)) #### Committers: 1 - Ilya Radchenko ([@knownasilya](https://github.com/knownasilya)) ## v11.0.0 (2022-04-25) #### :boom: Breaking Change - [#216](https://github.com/adopted-ember-addons/ember-cli-sass/pull/216) drop node support for < 10 #### :rocket: Enhancement - [#220](https://github.com/adopted-ember-addons/ember-cli-sass/pull/220) Only rebuild on changes to (sass|scss|css) files ([@rohitpaulk](https://github.com/rohitpaulk)) #### Committers: 5 - Francesco Novy ([@mydea](https://github.com/mydea)) - Gabriel Csapo ([@gabrielcsapo](https://github.com/gabrielcsapo)) - Ilya Radchenko ([@knownasilya](https://github.com/knownasilya)) - Paul Kuruvilla ([@rohitpaulk](https://github.com/rohitpaulk)) - Simon Wade ([@simonexmachina](https://github.com/simonexmachina)) ================================================ FILE: LICENSE.md ================================================ The MIT License (MIT) Copyright (c) 2017 Simon Wade Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ # ember-cli-sass [](https://www.npmjs.com/package/ember-cli-sass) [](https://travis-ci.org/aexmachina/ember-cli-sass) [](http://emberobserver.com/addons/ember-cli-sass) [](https://david-dm.org/aexmachina/ember-cli-sass) ember-cli-sass uses [Sass][] to preprocess your ember-cli app's styles, and provides support for source maps and include paths. It provides support for the common use case for Ember.js projects: [sass]: https://sass-lang.com/ - Source maps by default in development - Support for [`outputPaths` configuration](http://ember-cli.com/user-guide/#configuring-output-paths) - Provides the ability to specify include paths - Edit SASS in Chrome Dev Tools ## Installation ``` ember install ember-cli-sass ``` ### Addon Development If you want to use ember-cli-sass in an addon and you want to distribute the compiled CSS it must be installed as a `dependency` so that `addon/styles/addon.scss` is compiled into `dist/assets/vendor.css`. This can be done using: ```bash npm install --save ember-cli-sass sass ``` ## Using a different Sass implementation By default this addon uses a distribution of [Dart Sass][] that is compiled to pure JavaScript. Dart Sass is the reference implementation for Sass, but it does provides significantly slower compilation times than LibSass (via `node-sass`). [dart sass]: https://sass-lang.com/dart-sass If you would like to use an alternative implementation (e.g. [`node-sass`](https://github.com/sass/node-sass)), you must pass a Sass implementation to the `sassOptions` config property in `ember-cli-build.js` (or in `Brocfile.js` if you are using an Ember CLI version older than 1.13): ```javascript var nodeSass = require("node-sass"); var app = new EmberApp({ sassOptions: { implementation: nodeSass, }, }); ``` By default this addon will compile `app/styles/app.scss` into `dist/assets/app.css` and produce a source map for your delectation. If you want more control, you can pass additional options to `sassOptions`: - `includePaths`: an array of include paths - `onlyIncluded`: true/false whether to use only what is in `app/styles` and `includePaths`. This may helps with performance, particularly when using NPM linked modules - `sourceMap`: controls whether to generate sourceMaps, defaults to `true` in development. The sourceMap file will be saved to `options.outputFile + '.map'` - `extension`: specifies the file extension for the input files, defaults to `scss`. Set to `sass` if you want to use `.sass` instead. - `passthrough`: an optional hash of [broccoli-funnel](https://github.com/broccolijs/broccoli-funnel) configuration for files from the styles tree to be passed through to `dist` - See [broccoli-sass-source-maps](https://github.com/aexmachina/broccoli-sass-source-maps) for a list of other supported options. ### Processing multiple files If you need to process multiple files, it can be done by [configuring the output paths](http://ember-cli.com/user-guide/#configuring-output-paths) in your `ember-cli-build.js`: ```js var app = new EmberApp({ outputPaths: { app: { css: { app: "/assets/application-name.css", "themes/alpha": "/assets/themes/alpha.css", }, }, }, }); ``` ### Source Maps Source maps work for reading with no configuration, but to edit the SASS in the Dev Tools you need to configure your Workspace: 1. Open app.scss in Dev Tools (you can use ⌘P and search for "app.scss") 1. Right click in the Sources panel on the right of the Sources tab and select _Add Folder to Workspace_ 1. Select the root directory of your project 1. Right click on app.scss and select _Map to File System Resource..._ 1. Select app.scss from your project directory ## Example Install some SASS: ```shell npm install --save foundation ``` Specify some include paths in your `ember-cli-build.js`: ```javascript var app = new EmberApp({ sassOptions: { includePaths: ["node_modules/foundation/scss"], }, }); ``` Import some deps into your app.scss: ```scss @import "foundation"; /* import everything */ /* or just import the bits you need: @import 'foundation/functions'; */ ``` ## Addon Usage To compile SASS within an ember-cli addon, there are a few additional steps: 1. Include your styles in `addon/styles/addon.scss`. 2. Ensure you've installed `ember-cli-sass` and either `sass` or `node-sass` under `dependencies` in your `package.json`. 3. Define an `included` function in your addon's `index.js`: ```js // in your index.js module.exports = { name: "my-addon", included: function (/* app */) { this._super.included.apply(this, arguments); }, }; ``` If you omit this step, it will throw the following error: ``` Cannot read property 'sassOptions' of undefined TypeError: Cannot read property 'sassOptions' of undefined at Class.module.exports.sassOptions (~/my-plugin/node_modules/ember-cli-sass/index.js:43:48) ``` 4. Make sure your dummy app contains an `app.scss` 5. If you run `ember build dist`, your styles from `addon/styles/addon.scss` should appear correctly in `dist/assets/vendor.css` ## Alternative Addon Usage As an alternative to the above, some addons may choose to allow their SASS to be used in the parent app, rather than the compiled CSS. This has the advantage of easily allowing users to use and override your SASS. The steps for this setup are as follows: 1. Instead of including your styles in `addon/styles/addon.scss`, place them in `app/styles/your-addon-name.scss`. Document that your user can now add `@import 'your-addon-name';` to their `app.scss` file. In the lines before this import they can choose to override any variables your addon marks with [default](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#variable_defaults_). 2. Ensure steps 2, 3 and 4 are completed as per the standard addon usage section above. ## Usage within in-repo addon and in-repo engine To re-use SASS definitions from an in-repo-addon within an in-repo-engine, you need to add the in-repo addons' path to the `includePaths`. So basically if you have a directory layout like this (where `common` is an in-repo addon): ``` app └── lib ├── my-in-repo-engine │ ├── addon │ │ └── styles │ │ └── addon.scss │ └── index.js └── common └── app └── styles └── common └── vars.scss ``` The `app/lib/my-in-repo-engine/index.js` should look like this: ```js const EngineAddon = require('ember-engines/lib/engine-addon'); module.exports = EngineAddon.extend({ sassOptions: { includePaths: ['lib/common/app/styles'] }, ... }; ``` and then you can include the definitions inside the engines SASS files via: ```scss @import "common/vars"; ``` ## Changelog - v9.0.0 Added support for multiple sass implementations (e.g. Dart Sass, LibSass, etc.) The default Sass implementation is [Dart Sass](https://sass-lang.com/dart-sass), which is now the [reference implementation of Sass](http://sass.logdown.com/posts/1022316-announcing-dart-sass). This provides significantly slower compilation times than node-sass, but you can see instructions above if you'd like to continue using node-sass. ================================================ FILE: RELEASE.md ================================================ # Release Process Releases are mostly automated using [release-it](https://github.com/release-it/release-it/) and [lerna-changelog](https://github.com/lerna/lerna-changelog/). ## Preparation Since the majority of the actual release process is automated, the primary remaining task prior to releasing is confirming that all pull requests that have been merged since the last release have been labeled with the appropriate `lerna-changelog` labels and the titles have been updated to ensure they represent something that would make sense to our users. Some great information on why this is important can be found at [keepachangelog.com](https://keepachangelog.com/en/1.0.0/), but the overall guiding principle here is that changelogs are for humans, not machines. When reviewing merged PR's the labels to be used are: * breaking - Used when the PR is considered a breaking change. * enhancement - Used when the PR adds a new feature or enhancement. * bug - Used when the PR fixes a bug included in a previous release. * documentation - Used when the PR adds or updates documentation. * internal - Used for internal changes that still require a mention in the changelog/release notes. ## Release Once the prep work is completed, the actual release is straight forward: * First, ensure that you have installed your projects dependencies: ```sh npm install ``` * Second, ensure that you have obtained a [GitHub personal access token][generate-token] with the `repo` scope (no other permissions are needed). Make sure the token is available as the `GITHUB_AUTH` environment variable. For instance: ```bash export GITHUB_AUTH=abc123def456 ``` [generate-token]: https://github.com/settings/tokens/new?scopes=repo&description=GITHUB_AUTH+env+variable * And last (but not least 😁) do your release. ```sh npx release-it ``` [release-it](https://github.com/release-it/release-it/) manages the actual release process. It will prompt you to to choose the version number after which you will have the chance to hand tweak the changelog to be used (for the `CHANGELOG.md` and GitHub release), then `release-it` continues on to tagging, pushing the tag and commits, etc. ================================================ FILE: app/.gitkeep ================================================ ================================================ FILE: blueprints/ember-cli-sass/index.js ================================================ /* eslint-env node */ module.exports = { normalizeEntityName() {}, // no-op since we're just adding dependencies afterInstall() { return this.addPackageToProject('sass'); } }; ================================================ FILE: config/ember-try.js ================================================ 'use strict'; const getChannelURL = require('ember-source-channel-url'); module.exports = function() { return Promise.all([ getChannelURL('release'), getChannelURL('beta'), getChannelURL('canary') ]).then((urls) => { return { scenarios: [ { name: 'ember-lts-2.12', npm: { devDependencies: { 'ember-source': '~2.12.0' } } }, { name: 'ember-lts-2.16', npm: { devDependencies: { 'ember-source': '~2.16.0' } } }, { name: 'ember-lts-2.18', npm: { devDependencies: { 'ember-source': '~2.18.0' } } }, { name: 'ember-release', npm: { devDependencies: { 'ember-source': urls[0] } } }, { name: 'ember-beta', npm: { devDependencies: { 'ember-source': urls[1] } } }, { name: 'ember-canary', npm: { devDependencies: { 'ember-source': urls[2] } } }, { name: 'ember-default', npm: { devDependencies: {} } } ] }; }); }; ================================================ FILE: config/environment.js ================================================ /* eslint-env node */ 'use strict'; module.exports = function(/* environment, appConfig */) { return { }; }; ================================================ FILE: ember-cli-build.js ================================================ /* eslint-env node */ "use strict"; const EmberAddon = require("ember-cli/lib/broccoli/ember-addon"); const sass = require("sass"); module.exports = function (defaults) { let app = new EmberAddon(defaults, { outputPaths: { app: { css: { app: "/assets/dummy.css", "output-path": "/assets/output-path.css", }, }, }, sassOptions: { implementation: sass, includePaths: ["node_modules/spinkit/scss"], }, }); /* This build file specifies the options for the dummy test app of this addon, located in `/tests/dummy` This build file does *not* influence how the addon or the app using it behave. You most likely want to be modifying `./index.js` or app's build file */ return app.toTree(); }; ================================================ FILE: index.js ================================================ 'use strict'; /* eslint-env node */ var SassCompilerFactory = require('broccoli-sass-source-maps'); var path = require('path'); var VersionChecker = require('ember-cli-version-checker'); var Funnel = require('broccoli-funnel'); var mergeTrees = require('broccoli-merge-trees'); function SASSPlugin(optionsFn) { this.name = 'ember-cli-sass'; this.optionsFn = optionsFn; this.ext = ['scss', 'sass']; } SASSPlugin.prototype.toTree = function(tree, inputPath, outputPath, inputOptions) { var options = Object.assign({}, this.optionsFn(), inputOptions); var inputTrees = [ new Funnel(tree, { include: [options.onlyIncluded ? 'app/styles/**/*' : /\.(scss|sass|css)$/], annotation: 'Funnel (styles)' }) ]; if (options.includePaths) { inputTrees = inputTrees.concat(options.includePaths); } if (!options.implementation) { try { // eslint-disable-next-line node/no-unpublished-require options.implementation = require('sass'); } catch (e) { var error = new Error( 'Could not find the default SASS implementation. Run the default blueprint:\n' + ' ember g ember-cli-sass\n' + 'Or install an implementation such as "node-sass" and add an implementation option. For example:\n' + ' sassOptions: {implementation: require("node-sass")}'); error.type = 'Sass Plugin Error'; throw error; } } var SassCompiler = SassCompilerFactory(options.implementation); var ext = options.extension || 'scss'; var paths = options.outputPaths; var trees = Object.keys(paths).map(function(file) { var input = path.join(inputPath, file + '.' + ext); var output = paths[file]; return new SassCompiler(inputTrees, input, output, options); }); if (options.passthrough) { trees.push(new Funnel(tree, options.passthrough)); } return mergeTrees(trees); }; module.exports = { name: 'ember-cli-sass', shouldSetupRegistryInIncluded: function() { let checker = new VersionChecker(this); return !checker.for('ember-cli').isAbove('0.2.0'); }, sassOptions: function () { var env = process.env.EMBER_ENV; var envConfig = this.project.config(env).sassOptions; var app = this.app; var parent = this.parent; var hostApp = typeof this._findHost === 'function' ? this._findHost() : undefined; // *Either* use the options for an addon which is consuming this, *or* for // an app which is consuming this, but never *both* at the same time. The // special case here is when testing an addon. // In lazy loading engines, the host might be different from the parent, so we fall back to that one var options = (app && app.options && app.options.sassOptions) || (parent && parent.options && parent.options.sassOptions) || (hostApp && hostApp.options && hostApp.options.sassOptions) || {}; if (envConfig) { console.warn("Deprecation warning: sassOptions should be moved to your ember-cli-build"); // eslint-disable-line Object.assign(options, envConfig); } if ((options.sourceMap === undefined) && (env == 'development')) { options.sourceMap = true; } if (options.sourceMap || options.sourceMapEmbed) { // we need to embed the sourcesContent in the source map until libsass has better support for broccoli-sass options.sourceMapContents = true; } options.outputFile = options.outputFile || this.project.name() + '.css'; options.sourceMapRoot = path.join(this.project.root, 'app/styles'); return options; }, setupPreprocessorRegistry: function(type, registry) { registry.add('css', new SASSPlugin(this.sassOptions.bind(this))); // prevent conflict with broccoli-sass if it's installed if (registry.remove) registry.remove('css', 'broccoli-sass'); }, included: function included(app) { this._super.included.apply(this, arguments); // see: https://github.com/ember-cli/ember-cli/issues/3718 if (typeof app.import !== 'function' && app.app) { app = app.app; } this.app = app; if (this.shouldSetupRegistryInIncluded()) { this.setupPreprocessorRegistry('parent', app.registry); } } }; ================================================ FILE: package.json ================================================ { "name": "ember-cli-sass", "version": "11.0.1", "description": "Use Sass to preprocess your ember-cli app's files, with support for sourceMaps and include paths", "keywords": [ "ember-addon", "sass" ], "homepage": "https://github.com/adopted-ember-addons/ember-cli-sass", "bugs": { "url": "https://github.com/adopted-ember-addons/ember-cli-sass/issues" }, "repository": { "type": "git", "url": "git://github.com/adopted-ember-addons/ember-cli-sass.git" }, "license": "MIT", "author": "@aexmachina", "directories": { "doc": "doc", "test": "tests" }, "scripts": { "build": "ember build", "lint:js": "eslint .", "start": "ember serve", "test": "ember test", "test:all": "ember try:each" }, "dependencies": { "broccoli-funnel": "^2.0.1", "broccoli-merge-trees": "^3.0.1", "broccoli-sass-source-maps": "^4.0.0", "ember-cli-version-checker": "^2.1.0" }, "devDependencies": { "broccoli-asset-rev": "^2.7.0", "broccoli-clean-css": "^1.1.0", "ember-cli": "^3.4.1", "ember-cli-babel": "^6.6.0", "ember-cli-dependency-checker": "^2.0.0", "ember-cli-eslint": "^4.2.1", "ember-cli-htmlbars": "^2.0.1", "ember-cli-htmlbars-inline-precompile": "^1.0.3", "ember-cli-inject-live-reload": "^1.4.1", "ember-cli-qunit": "^4.3.2", "ember-cli-shims": "^1.2.0", "ember-cli-sri": "^2.1.0", "ember-cli-uglify": "^2.0.0", "ember-disable-prototype-extensions": "^1.1.2", "ember-export-application-global": "^2.0.0", "ember-load-initializers": "^1.1.0", "ember-maybe-import-regenerator": "^0.1.6", "ember-resolver": "^4.0.0", "ember-source": "^3.4.0", "ember-source-channel-url": "^1.0.1", "ember-try": "^1.0.0", "eslint-plugin-ember": "^5.0.0", "eslint-plugin-node": "^6.0.1", "loader.js": "^4.2.3", "qunit-dom": "^0.7.1", "release-it": "^14.2.1", "release-it-lerna-changelog": "^3.1.0", "sass": "^1.51.0", "spinkit": "^1.2.5" }, "engines": { "node": ">= 10.*" }, "publishConfig": { "registry": "https://registry.npmjs.org" }, "ember-addon": { "configPath": "tests/dummy/config" }, "release-it": { "plugins": { "release-it-lerna-changelog": { "infile": "CHANGELOG.md", "launchEditor": false } }, "git": { "tagName": "v${version}" }, "github": { "release": true, "tokenRef": "GITHUB_AUTH" } } } ================================================ FILE: testem.js ================================================ /* eslint-env node */ module.exports = { test_page: 'tests/index.html?hidepassed', disable_watching: true, launch_in_ci: [ 'Chrome' ], launch_in_dev: [ 'Chrome' ], browser_args: { Chrome: { ci: [ // --no-sandbox is needed when running Chrome inside a container process.env.CI ? '--no-sandbox' : null, '--headless', '--disable-gpu', '--disable-dev-shm-usage', '--disable-software-rasterizer', '--mute-audio', '--remote-debugging-port=0', '--window-size=1440,900' ].filter(Boolean) } } }; ================================================ FILE: tests/.eslintrc.js ================================================ module.exports = { env: { embertest: true } }; ================================================ FILE: tests/acceptance/app-test.js ================================================ import { module, test } from 'qunit'; import { visit, find } from '@ember/test-helpers'; import { setupApplicationTest } from 'ember-qunit'; let getCSS = function(el, prop) { let style = window.getComputedStyle(el); return style.getPropertyValue(prop); } module('Acceptance | app', function(hooks) { setupApplicationTest(hooks); test('app.scss is loaded', async function(assert) { await visit('/'); assert.ok(getCSS(find('#app-css'), 'font-family')); }); test('outputPaths are supported', async function(assert) { await visit('/'); assert.ok(getCSS(find('#output-path-css'), 'font-family')); }); test('includePaths are supported', async function(assert) { await visit('/'); assert.ok(getCSS(find('#include-path-css'), 'animation-duration')); }); test('addons can inject styles', async function(assert) { await visit('/'); assert.ok(getCSS(find('h1'), 'font-family')); }); }); ================================================ FILE: tests/dummy/app/app.js ================================================ import Application from '@ember/application'; import Resolver from './resolver'; import loadInitializers from 'ember-load-initializers'; import config from './config/environment'; const App = Application.extend({ modulePrefix: config.modulePrefix, podModulePrefix: config.podModulePrefix, Resolver }); loadInitializers(App, config.modulePrefix); export default App; ================================================ FILE: tests/dummy/app/components/.gitkeep ================================================ ================================================ FILE: tests/dummy/app/controllers/.gitkeep ================================================ ================================================ FILE: tests/dummy/app/helpers/.gitkeep ================================================ ================================================ FILE: tests/dummy/app/index.html ================================================