{{snippet}}
10 | My addon's classes should come after Tailwind's 11 |
12 | 13 | {{outlet}} 14 | -------------------------------------------------------------------------------- /test-projects/scenario-2-addon-using-tailwind/sample-addon/tests/dummy/config/targets.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const browsers = [ 4 | 'last 1 Chrome versions', 5 | 'last 1 Firefox versions', 6 | 'last 1 Safari versions' 7 | ]; 8 | 9 | const isCI = !!process.env.CI; 10 | const isProduction = process.env.EMBER_ENV === 'production'; 11 | 12 | if (isCI || isProduction) { 13 | browsers.push('ie 11'); 14 | } 15 | 16 | module.exports = { 17 | browsers 18 | }; 19 | -------------------------------------------------------------------------------- /test-projects/scenario-2-addon-using-tailwind/sample-addon/tests/dummy/public/robots.txt: -------------------------------------------------------------------------------- 1 | # http://www.robotstxt.org 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /test-projects/scenario-2-addon-using-tailwind/sample-addon/tests/helpers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/embermap/ember-cli-tailwind/35c4ad60398ebb8f9565bd87aa82437971688e08/test-projects/scenario-2-addon-using-tailwind/sample-addon/tests/helpers/.gitkeep -------------------------------------------------------------------------------- /test-projects/scenario-2-addon-using-tailwind/sample-addon/tests/helpers/destroy-app.js: -------------------------------------------------------------------------------- 1 | import { run } from '@ember/runloop'; 2 | 3 | export default function destroyApp(application) { 4 | run(application, 'destroy'); 5 | } 6 | -------------------------------------------------------------------------------- /test-projects/scenario-2-addon-using-tailwind/sample-addon/tests/helpers/module-for-acceptance.js: -------------------------------------------------------------------------------- 1 | import { module } from 'qunit'; 2 | import { resolve } from 'rsvp'; 3 | import startApp from '../helpers/start-app'; 4 | import destroyApp from '../helpers/destroy-app'; 5 | 6 | export default function(name, options = {}) { 7 | module(name, { 8 | beforeEach() { 9 | this.application = startApp(); 10 | 11 | if (options.beforeEach) { 12 | return options.beforeEach.apply(this, arguments); 13 | } 14 | }, 15 | 16 | afterEach() { 17 | let afterEach = options.afterEach && options.afterEach.apply(this, arguments); 18 | return resolve(afterEach).then(() => destroyApp(this.application)); 19 | } 20 | }); 21 | } 22 | -------------------------------------------------------------------------------- /test-projects/scenario-2-addon-using-tailwind/sample-addon/tests/helpers/start-app.js: -------------------------------------------------------------------------------- 1 | import Application from '../../app'; 2 | import config from '../../config/environment'; 3 | import { merge } from '@ember/polyfills'; 4 | import { run } from '@ember/runloop'; 5 | 6 | export default function startApp(attrs) { 7 | let attributes = merge({}, config.APP); 8 | attributes.autoboot = true; 9 | attributes = merge(attributes, attrs); // use defaults, but you can override; 10 | 11 | return run(() => { 12 | let application = Application.create(attributes); 13 | application.setupForTesting(); 14 | application.injectTestHelpers(); 15 | return application; 16 | }); 17 | } 18 | -------------------------------------------------------------------------------- /test-projects/scenario-2-addon-using-tailwind/sample-addon/tests/integration/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/embermap/ember-cli-tailwind/35c4ad60398ebb8f9565bd87aa82437971688e08/test-projects/scenario-2-addon-using-tailwind/sample-addon/tests/integration/.gitkeep -------------------------------------------------------------------------------- /test-projects/scenario-2-addon-using-tailwind/sample-addon/tests/integration/components/ui-button-test.js: -------------------------------------------------------------------------------- 1 | import { moduleForComponent, test } from 'ember-qunit'; 2 | import hbs from 'htmlbars-inline-precompile'; 3 | 4 | moduleForComponent('ui-button', 'Integration | Component | ui button', { 5 | integration: true 6 | }); 7 | 8 | test('it renders', function(assert) { 9 | // Set any properties with this.set('myProperty', 'value'); 10 | // Handle any actions with this.on('myAction', function(val) { ... }); 11 | 12 | this.render(hbs`{{ui-button}}`); 13 | 14 | assert.equal(this.$().text().trim(), ''); 15 | 16 | // Template block usage: 17 | this.render(hbs` 18 | {{#ui-button}} 19 | template block text 20 | {{/ui-button}} 21 | `); 22 | 23 | assert.equal(this.$().text().trim(), 'template block text'); 24 | }); 25 | -------------------------------------------------------------------------------- /test-projects/scenario-2-addon-using-tailwind/sample-addon/tests/integration/components/ui-title-test.js: -------------------------------------------------------------------------------- 1 | import { moduleForComponent, test } from 'ember-qunit'; 2 | import hbs from 'htmlbars-inline-precompile'; 3 | 4 | moduleForComponent('ui-title', 'Integration | Component | ui title', { 5 | integration: true 6 | }); 7 | 8 | test('it renders', function(assert) { 9 | // Set any properties with this.set('myProperty', 'value'); 10 | // Handle any actions with this.on('myAction', function(val) { ... }); 11 | 12 | this.render(hbs`{{ui-title}}`); 13 | 14 | assert.equal(this.$().text().trim(), ''); 15 | 16 | // Template block usage: 17 | this.render(hbs` 18 | {{#ui-title}} 19 | template block text 20 | {{/ui-title}} 21 | `); 22 | 23 | assert.equal(this.$().text().trim(), 'template block text'); 24 | }); 25 | -------------------------------------------------------------------------------- /test-projects/scenario-2-addon-using-tailwind/sample-addon/tests/test-helper.js: -------------------------------------------------------------------------------- 1 | import Application from '../app'; 2 | import config from '../config/environment'; 3 | import { setApplication } from '@ember/test-helpers'; 4 | import { start } from 'ember-qunit'; 5 | 6 | setApplication(Application.create(config.APP)); 7 | 8 | start(); 9 | -------------------------------------------------------------------------------- /test-projects/scenario-2-addon-using-tailwind/sample-addon/tests/unit/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/embermap/ember-cli-tailwind/35c4ad60398ebb8f9565bd87aa82437971688e08/test-projects/scenario-2-addon-using-tailwind/sample-addon/tests/unit/.gitkeep -------------------------------------------------------------------------------- /test-projects/scenario-2-addon-using-tailwind/sample-addon/vendor/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/embermap/ember-cli-tailwind/35c4ad60398ebb8f9565bd87aa82437971688e08/test-projects/scenario-2-addon-using-tailwind/sample-addon/vendor/.gitkeep -------------------------------------------------------------------------------- /test-projects/scenario-2-addon-using-tailwind/sample-app/.bin: -------------------------------------------------------------------------------- 1 | ../../../node_modules/.bin 2 | -------------------------------------------------------------------------------- /test-projects/scenario-2-addon-using-tailwind/sample-app/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | 8 | [*] 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = true 12 | insert_final_newline = true 13 | indent_style = space 14 | indent_size = 2 15 | 16 | [*.hbs] 17 | insert_final_newline = false 18 | 19 | [*.{diff,md}] 20 | trim_trailing_whitespace = false 21 | -------------------------------------------------------------------------------- /test-projects/scenario-2-addon-using-tailwind/sample-app/.ember-cli: -------------------------------------------------------------------------------- 1 | { 2 | /** 3 | Ember CLI sends analytics information by default. The data is completely 4 | anonymous, but there are times when you might want to disable this behavior. 5 | 6 | Setting `disableAnalytics` to true will prevent any data from being sent. 7 | */ 8 | "disableAnalytics": false 9 | } 10 | -------------------------------------------------------------------------------- /test-projects/scenario-2-addon-using-tailwind/sample-app/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | parserOptions: { 4 | ecmaVersion: 2017, 5 | sourceType: 'module' 6 | }, 7 | plugins: [ 8 | 'ember' 9 | ], 10 | extends: [ 11 | 'eslint:recommended', 12 | 'plugin:ember/recommended' 13 | ], 14 | env: { 15 | browser: true 16 | }, 17 | rules: { 18 | }, 19 | overrides: [ 20 | // node files 21 | { 22 | files: [ 23 | 'testem.js', 24 | 'ember-cli-build.js', 25 | 'config/**/*.js', 26 | 'lib/*/index.js' 27 | ], 28 | parserOptions: { 29 | sourceType: 'script', 30 | ecmaVersion: 2015 31 | }, 32 | env: { 33 | browser: false, 34 | node: true 35 | } 36 | }, 37 | 38 | // test files 39 | { 40 | files: ['tests/**/*.js'], 41 | excludedFiles: ['tests/dummy/**/*.js'], 42 | env: { 43 | embertest: true 44 | } 45 | } 46 | ] 47 | }; 48 | -------------------------------------------------------------------------------- /test-projects/scenario-2-addon-using-tailwind/sample-app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | 7 | # dependencies 8 | /node_modules 9 | /bower_components 10 | 11 | # misc 12 | /.sass-cache 13 | /connect.lock 14 | /coverage/* 15 | /libpeerconnection.log 16 | npm-debug.log* 17 | yarn-error.log 18 | testem.log 19 | 20 | # ember-try 21 | .node_modules.ember-try/ 22 | bower.json.ember-try 23 | package.json.ember-try 24 | -------------------------------------------------------------------------------- /test-projects/scenario-2-addon-using-tailwind/sample-app/.travis.yml: -------------------------------------------------------------------------------- 1 | --- 2 | language: node_js 3 | node_js: 4 | - "6" 5 | 6 | sudo: false 7 | dist: trusty 8 | 9 | addons: 10 | chrome: stable 11 | 12 | cache: 13 | directories: 14 | - $HOME/.npm 15 | 16 | env: 17 | global: 18 | # See https://git.io/vdao3 for details. 19 | - JOBS=1 20 | 21 | before_install: 22 | - npm config set spin false 23 | 24 | script: 25 | - npm run lint:js 26 | - npm test 27 | -------------------------------------------------------------------------------- /test-projects/scenario-2-addon-using-tailwind/sample-app/.watchmanconfig: -------------------------------------------------------------------------------- 1 | { 2 | "ignore_dirs": ["tmp", "dist"] 3 | } 4 | -------------------------------------------------------------------------------- /test-projects/scenario-2-addon-using-tailwind/sample-app/app/app.js: -------------------------------------------------------------------------------- 1 | import Application from '@ember/application'; 2 | import Resolver from './resolver'; 3 | import loadInitializers from 'ember-load-initializers'; 4 | import config from './config/environment'; 5 | 6 | const App = Application.extend({ 7 | modulePrefix: config.modulePrefix, 8 | podModulePrefix: config.podModulePrefix, 9 | Resolver 10 | }); 11 | 12 | loadInitializers(App, config.modulePrefix); 13 | 14 | export default App; 15 | -------------------------------------------------------------------------------- /test-projects/scenario-2-addon-using-tailwind/sample-app/app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |