├── .editorconfig ├── .ember-cli ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .npmignore ├── .template-lintrc.js ├── .travis.yml ├── .watchmanconfig ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── RELEASE.md ├── config ├── ember-try.js └── environment.js ├── ember-cli-build.js ├── index.js ├── package.json ├── testem.js ├── tests ├── dummy │ ├── app │ │ ├── app.js │ │ ├── components │ │ │ └── .gitkeep │ │ ├── controllers │ │ │ └── .gitkeep │ │ ├── helpers │ │ │ └── .gitkeep │ │ ├── index.html │ │ ├── models │ │ │ └── .gitkeep │ │ ├── router.js │ │ ├── routes │ │ │ └── .gitkeep │ │ ├── styles │ │ │ └── app.css │ │ └── templates │ │ │ └── application.hbs │ ├── config │ │ ├── ember-cli-update.json │ │ ├── environment.js │ │ ├── optional-features.json │ │ └── targets.js │ └── public │ │ └── robots.txt ├── helpers │ └── .gitkeep ├── index.html ├── integration │ └── .gitkeep ├── test-helper.js └── unit │ └── .gitkeep └── yarn.lock /.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 | end_of_line = lf 9 | charset = utf-8 10 | trim_trailing_whitespace = true 11 | insert_final_newline = true 12 | indent_style = space 13 | indent_size = 2 14 | 15 | [*.hbs] 16 | insert_final_newline = false 17 | 18 | [*.{diff,md}] 19 | trim_trailing_whitespace = false 20 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | # unconventional js 2 | /blueprints/*/files/ 3 | /vendor/ 4 | 5 | # compiled output 6 | /dist/ 7 | /tmp/ 8 | 9 | # dependencies 10 | /bower_components/ 11 | /node_modules/ 12 | 13 | # misc 14 | /coverage/ 15 | !.* 16 | 17 | # ember-try 18 | /.node_modules.ember-try/ 19 | /bower.json.ember-try 20 | /package.json.ember-try 21 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | root: true, 5 | parser: 'babel-eslint', 6 | parserOptions: { 7 | ecmaVersion: 2018, 8 | sourceType: 'module', 9 | ecmaFeatures: { 10 | legacyDecorators: true 11 | } 12 | }, 13 | plugins: [ 14 | 'ember' 15 | ], 16 | extends: [ 17 | 'eslint:recommended', 18 | 'plugin:ember/recommended' 19 | ], 20 | env: { 21 | browser: true 22 | }, 23 | rules: { 24 | 'ember/no-jquery': 'error' 25 | }, 26 | overrides: [ 27 | // node files 28 | { 29 | files: [ 30 | '.eslintrc.js', 31 | '.template-lintrc.js', 32 | 'ember-cli-build.js', 33 | 'index.js', 34 | 'testem.js', 35 | 'blueprints/*/index.js', 36 | 'config/**/*.js', 37 | 'tests/dummy/config/**/*.js' 38 | ], 39 | excludedFiles: [ 40 | 'addon/**', 41 | 'addon-test-support/**', 42 | 'app/**', 43 | 'tests/dummy/app/**' 44 | ], 45 | parserOptions: { 46 | sourceType: 'script' 47 | }, 48 | env: { 49 | browser: false, 50 | node: true 51 | }, 52 | plugins: ['node'], 53 | rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, { 54 | // add your custom rules and overrides for node files here 55 | }) 56 | } 57 | ] 58 | }; 59 | -------------------------------------------------------------------------------- /.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 | /bower_components/ 9 | /node_modules/ 10 | 11 | # misc 12 | /.env* 13 | /.pnp* 14 | /.sass-cache 15 | /connect.lock 16 | /coverage/ 17 | /libpeerconnection.log 18 | /npm-debug.log* 19 | /testem.log 20 | /yarn-error.log 21 | 22 | # ember-try 23 | /.node_modules.ember-try/ 24 | /bower.json.ember-try 25 | /package.json.ember-try 26 | 27 | .idea/ 28 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # compiled output 2 | /dist/ 3 | /tmp/ 4 | 5 | # dependencies 6 | /bower_components/ 7 | 8 | # misc 9 | /.bowerrc 10 | /.editorconfig 11 | /.ember-cli 12 | /.env* 13 | /.eslintignore 14 | /.eslintrc.js 15 | /.git/ 16 | /.gitignore 17 | /.template-lintrc.js 18 | /.travis.yml 19 | /.watchmanconfig 20 | /bower.json 21 | /config/ember-try.js 22 | /CONTRIBUTING.md 23 | /ember-cli-build.js 24 | /testem.js 25 | /tests/ 26 | /yarn.lock 27 | .gitkeep 28 | 29 | # ember-try 30 | /.node_modules.ember-try/ 31 | /bower.json.ember-try 32 | /package.json.ember-try 33 | 34 | .idea/ 35 | -------------------------------------------------------------------------------- /.template-lintrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | extends: 'octane' 5 | }; 6 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | --- 2 | language: node_js 3 | node_js: 4 | # we recommend testing addons with the same minimum supported node version as Ember CLI 5 | # so that your addon works for all apps 6 | - "10" 7 | 8 | dist: trusty 9 | 10 | addons: 11 | chrome: stable 12 | 13 | cache: 14 | yarn: true 15 | 16 | env: 17 | global: 18 | # See https://git.io/vdao3 for details. 19 | - JOBS=1 20 | 21 | branches: 22 | only: 23 | - master 24 | # npm version tags 25 | - /^v\d+\.\d+\.\d+/ 26 | 27 | jobs: 28 | fast_finish: true 29 | allow_failures: 30 | - env: EMBER_TRY_SCENARIO=ember-canary 31 | 32 | include: 33 | # runs linting and tests with current locked deps 34 | - stage: "Tests" 35 | name: "Tests" 36 | script: 37 | - yarn lint 38 | - yarn test:ember 39 | 40 | - stage: "Additional Tests" 41 | name: "Floating Dependencies" 42 | install: 43 | - yarn install --no-lockfile --non-interactive 44 | script: 45 | - yarn test:ember 46 | 47 | # we recommend new addons test the current and previous LTS 48 | # as well as latest stable release (bonus points to beta/canary) 49 | - env: EMBER_TRY_SCENARIO=ember-lts-3.12 50 | - env: EMBER_TRY_SCENARIO=ember-lts-3.16 51 | - env: EMBER_TRY_SCENARIO=ember-release 52 | - env: EMBER_TRY_SCENARIO=ember-beta 53 | - env: EMBER_TRY_SCENARIO=ember-canary 54 | - env: EMBER_TRY_SCENARIO=ember-default-with-jquery 55 | - env: EMBER_TRY_SCENARIO=ember-classic 56 | 57 | before_install: 58 | - curl -o- -L https://yarnpkg.com/install.sh | bash 59 | - export PATH=$HOME/.yarn/bin:$PATH 60 | 61 | install: 62 | - yarn install --non-interactive 63 | 64 | script: 65 | - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO 66 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | { 2 | "ignore_dirs": ["tmp", "dist"] 3 | } 4 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## v0.4.1 (2020-06-18) 2 | 3 | ## v0.4.0 (2020-06-18) 4 | 5 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How To Contribute 2 | 3 | ## Installation 4 | 5 | * `git clone ` 6 | * `cd ember-cli-netlify` 7 | * `yarn install` 8 | 9 | ## Linting 10 | 11 | * `yarn lint:hbs` 12 | * `yarn lint:js` 13 | * `yarn lint:js --fix` 14 | 15 | ## Running tests 16 | 17 | * `ember test` – Runs the test suite on the current Ember version 18 | * `ember test --server` – Runs the test suite in "watch mode" 19 | * `ember try:each` – Runs the test suite against multiple Ember versions 20 | 21 | ## Running the dummy application 22 | 23 | * `ember serve` 24 | * Visit the dummy application at [http://localhost:4200](http://localhost:4200). 25 | 26 | For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/). 27 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 4 | 5 | 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: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | 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. 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ember-cli-netlify 2 | ============================================================================== 3 | 4 | Ship Shape 5 | 6 | **[ember-cli-netlify is built and maintained by Ship Shape. Contact us for Ember.js consulting, development, and training for your project](https://shipshape.io/ember-consulting/)**. 7 | 8 | [![npm version](https://badge.fury.io/js/ember-cli-netlify.svg)](http://badge.fury.io/js/ember-cli-netlify) 9 | ![Download count all time](https://img.shields.io/npm/dt/ember-cli-netlify.svg) 10 | [![npm](https://img.shields.io/npm/dm/ember-cli-netlify.svg)]() 11 | [![Ember Observer Score](http://emberobserver.com/badges/ember-cli-netlify.svg)](http://emberobserver.com/addons/ember-cli-netlify) 12 | [![Build Status](https://travis-ci.org/shipshapecode/ember-cli-netlify.svg)](https://travis-ci.org/shipshapecode/ember-cli-netlify) 13 | 14 | This addon allows you to configure your Netlify headers and redirects. 15 | 16 | 17 | Compatibility 18 | ------------------------------------------------------------------------------ 19 | 20 | * Ember.js v3.12 or above 21 | * Ember CLI v2.13 or above 22 | * Node.js v10 or above 23 | 24 | 25 | Installation 26 | ------------------------------------------------------------------------------ 27 | 28 | ``` 29 | ember install ember-cli-netlify 30 | ``` 31 | 32 | Usage 33 | ------------------------------------------------------------------------------ 34 | 35 | ### .netlifyheaders and/or .netlifyredirects 36 | 37 | There are a few ways to use this addon. The first one is to define a `.netlifyheaders` 38 | and/or a `.netlifyredirects` file in the root of your project and this 39 | addon will copy the output to `dist/_headers` and `dist/_redirects` respectively. 40 | 41 | ### ember-cli-build.js 42 | 43 | The second way is to define an `ember-cli-netlify` hash in your `ember-cli-build.js`. 44 | You can combine these methods, and anything defined in the config hash will be 45 | appended to the existing files. Currently, only redirects are supported, not headers. 46 | 47 | ```js 48 | 'ember-cli-netlify': { 49 | redirects: [ 50 | 'https://blog.shipshape.io/* https://shipshape.io/blog/:splat 301!', 51 | 'https://blog.shipshape.io/* https://shipshape.io/blog/:splat 301!' 52 | ] 53 | } 54 | ``` 55 | 56 | ### Using in an addon 57 | 58 | The final option, for addon authors, is to declare redirects for ember-cli-netlify during compilation. 59 | To do so, you will want to: 60 | 61 | * Add `"ember-cli-netlify-plugin"` to your addon's package.json keywords array. 62 | * Define a `netlifyRedirects()` function in your addon's main file, that returns an array of redirects. 63 | * Advise your addon's users to install & configure `ember-cli-netlify` in the host application. 64 | 65 | 66 | Contributing 67 | ------------------------------------------------------------------------------ 68 | 69 | See the [Contributing](CONTRIBUTING.md) guide for details. 70 | 71 | 72 | License 73 | ------------------------------------------------------------------------------ 74 | 75 | This project is licensed under the [MIT License](LICENSE.md). 76 | -------------------------------------------------------------------------------- /RELEASE.md: -------------------------------------------------------------------------------- 1 | # Release 2 | 3 | Releases are mostly automated using 4 | [release-it](https://github.com/release-it/release-it/) and 5 | [lerna-changelog](https://github.com/lerna/lerna-changelog/). 6 | 7 | 8 | ## Preparation 9 | 10 | Since the majority of the actual release process is automated, the primary 11 | remaining task prior to releasing is confirming that all pull requests that 12 | have been merged since the last release have been labeled with the appropriate 13 | `lerna-changelog` labels and the titles have been updated to ensure they 14 | represent something that would make sense to our users. Some great information 15 | on why this is important can be found at 16 | [keepachangelog.com](https://keepachangelog.com/en/1.0.0/), but the overall 17 | guiding principle here is that changelogs are for humans, not machines. 18 | 19 | When reviewing merged PR's the labels to be used are: 20 | 21 | * breaking - Used when the PR is considered a breaking change. 22 | * enhancement - Used when the PR adds a new feature or enhancement. 23 | * bug - Used when the PR fixes a bug included in a previous release. 24 | * documentation - Used when the PR adds or updates documentation. 25 | * internal - Used for internal changes that still require a mention in the 26 | changelog/release notes. 27 | 28 | 29 | ## Release 30 | 31 | Once the prep work is completed, the actual release is straight forward: 32 | 33 | * First ensure that you have `release-it` installed globally, generally done by 34 | using one of the following commands: 35 | 36 | ``` 37 | # using https://volta.sh 38 | volta install release-it 39 | 40 | # using Yarn 41 | yarn global add release-it 42 | 43 | # using npm 44 | npm install --global release-it 45 | ``` 46 | 47 | * Second, ensure that you have installed your projects dependencies: 48 | 49 | ``` 50 | yarn install 51 | ``` 52 | 53 | * And last (but not least 😁) do your release. It requires a 54 | [GitHub personal access token](https://github.com/settings/tokens) as 55 | `$GITHUB_AUTH` environment variable. Only "repo" access is needed; no "admin" 56 | or other scopes are required. 57 | 58 | ``` 59 | export GITHUB_AUTH="f941e0..." 60 | release-it 61 | ``` 62 | 63 | [release-it](https://github.com/release-it/release-it/) manages the actual 64 | release process. It will prompt you to to choose the version number after which 65 | you will have the chance to hand tweak the changelog to be used (for the 66 | `CHANGELOG.md` and GitHub release), then `release-it` continues on to tagging, 67 | pushing the tag and commits, etc. 68 | -------------------------------------------------------------------------------- /config/ember-try.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const getChannelURL = require('ember-source-channel-url'); 4 | 5 | module.exports = async function() { 6 | return { 7 | useYarn: true, 8 | scenarios: [ 9 | { 10 | name: 'ember-lts-3.12', 11 | npm: { 12 | devDependencies: { 13 | 'ember-source': '~3.12.0' 14 | } 15 | } 16 | }, 17 | { 18 | name: 'ember-lts-3.16', 19 | npm: { 20 | devDependencies: { 21 | 'ember-source': '~3.16.0' 22 | } 23 | } 24 | }, 25 | { 26 | name: 'ember-release', 27 | npm: { 28 | devDependencies: { 29 | 'ember-source': await getChannelURL('release') 30 | } 31 | } 32 | }, 33 | { 34 | name: 'ember-beta', 35 | npm: { 36 | devDependencies: { 37 | 'ember-source': await getChannelURL('beta') 38 | } 39 | } 40 | }, 41 | { 42 | name: 'ember-canary', 43 | npm: { 44 | devDependencies: { 45 | 'ember-source': await getChannelURL('canary') 46 | } 47 | } 48 | }, 49 | // The default `.travis.yml` runs this scenario via `yarn test`, 50 | // not via `ember try`. It's still included here so that running 51 | // `ember try:each` manually or from a customized CI config will run it 52 | // along with all the other scenarios. 53 | { 54 | name: 'ember-default', 55 | npm: { 56 | devDependencies: {} 57 | } 58 | }, 59 | { 60 | name: 'ember-default-with-jquery', 61 | env: { 62 | EMBER_OPTIONAL_FEATURES: JSON.stringify({ 63 | 'jquery-integration': true 64 | }) 65 | }, 66 | npm: { 67 | devDependencies: { 68 | '@ember/jquery': '^0.5.1' 69 | } 70 | } 71 | }, 72 | { 73 | name: 'ember-classic', 74 | env: { 75 | EMBER_OPTIONAL_FEATURES: JSON.stringify({ 76 | 'application-template-wrapper': true, 77 | 'default-async-observers': false, 78 | 'template-only-glimmer-components': false 79 | }) 80 | }, 81 | npm: { 82 | ember: { 83 | edition: 'classic' 84 | } 85 | } 86 | } 87 | ] 88 | }; 89 | }; 90 | -------------------------------------------------------------------------------- /config/environment.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(/* environment, appConfig */) { 4 | return { }; 5 | }; 6 | -------------------------------------------------------------------------------- /ember-cli-build.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); 4 | 5 | module.exports = function(defaults) { 6 | let app = new EmberAddon(defaults, { 7 | // Add options here 8 | }); 9 | 10 | /* 11 | This build file specifies the options for the dummy test app of this 12 | addon, located in `/tests/dummy` 13 | This build file does *not* influence how the addon or the app using it 14 | behave. You most likely want to be modifying `./index.js` or app's build file 15 | */ 16 | 17 | return app.toTree(); 18 | }; 19 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const fs = require('fs-extra'); 4 | 5 | module.exports = { 6 | name: require('./package').name, 7 | outputReady() { 8 | const netlifyOptions = this.app.options['ember-cli-netlify']; 9 | const pluginRedirectFunctions = loadNetlifyRedirects(this); 10 | 11 | let redirectsFromPlugins = pluginRedirectFunctions.reduce((redirects, pluginRedirectFunction) => { 12 | return redirects.concat(pluginRedirectFunction()); 13 | }, []); 14 | 15 | if (fs.pathExistsSync('.netlifyheaders')) { 16 | fs.copySync('.netlifyheaders', 'dist/_headers', { clobber: true }); 17 | } 18 | 19 | if (fs.pathExistsSync('.netlifyredirects')) { 20 | fs.copySync('.netlifyredirects', 'dist/_redirects', { clobber: true }); 21 | } 22 | 23 | if (netlifyOptions && netlifyOptions.redirects) { 24 | netlifyOptions.redirects.forEach((redirect) => { 25 | writeToFile('dist/_redirects', redirect); 26 | }); 27 | } 28 | 29 | if (redirectsFromPlugins && redirectsFromPlugins.length) { 30 | redirectsFromPlugins.forEach((redirect) => { 31 | writeToFile('dist/_redirects', redirect); 32 | }); 33 | } 34 | } 35 | }; 36 | 37 | function loadNetlifyRedirects(context) { 38 | const addons = context.project.addons || []; 39 | 40 | return addons 41 | .filter((addon) => addon.pkg.keywords.includes('ember-cli-netlify-plugin')) 42 | .filter((addon) => typeof addon.netlifyRedirects === 'function') 43 | .map((addon) => addon.netlifyRedirects.bind(addon)); 44 | } 45 | 46 | /** 47 | * Write lines of text to a file 48 | * @param {string} file The file path 49 | * @param {string} text The text to write 50 | */ 51 | function writeToFile(file, text) { 52 | fs.outputFileSync(file, `${text}\n`, { flag: 'a' }); 53 | } 54 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ember-cli-netlify", 3 | "version": "0.4.1", 4 | "description": "An Ember addon to configure Netlify headers and redirects", 5 | "keywords": [ 6 | "ember-addon", 7 | "netlify", 8 | "headers", 9 | "redirects" 10 | ], 11 | "repository": { 12 | "type": "git", 13 | "url": "https://github.com/shipshapecode/ember-cli-netlify" 14 | }, 15 | "license": "MIT", 16 | "author": "", 17 | "directories": { 18 | "doc": "doc", 19 | "test": "tests" 20 | }, 21 | "scripts": { 22 | "build": "ember build --environment=production", 23 | "lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*", 24 | "lint:hbs": "ember-template-lint .", 25 | "lint:js": "eslint .", 26 | "start": "ember serve", 27 | "test": "npm-run-all lint:* test:*", 28 | "test:ember": "ember test", 29 | "test:ember-compatibility": "ember try:each" 30 | }, 31 | "devDependencies": { 32 | "@ember/optional-features": "^1.3.0", 33 | "babel-eslint": "^10.1.0", 34 | "broccoli-asset-rev": "^3.0.0", 35 | "ember-auto-import": "^1.5.3", 36 | "ember-cli": "~3.18.0", 37 | "ember-cli-babel": "^7.19.0", 38 | "ember-cli-dependency-checker": "^3.2.0", 39 | "ember-cli-inject-live-reload": "^2.0.2", 40 | "ember-cli-sri": "^2.1.1", 41 | "ember-cli-uglify": "^3.0.0", 42 | "ember-disable-prototype-extensions": "^1.1.3", 43 | "ember-export-application-global": "^2.0.1", 44 | "ember-load-initializers": "^2.1.1", 45 | "ember-maybe-import-regenerator": "^0.1.6", 46 | "ember-qunit": "^4.6.0", 47 | "ember-resolver": "^8.0.0", 48 | "ember-source": "~3.19.0", 49 | "ember-source-channel-url": "^2.0.1", 50 | "ember-template-lint": "^2.6.0", 51 | "ember-try": "^1.4.0", 52 | "eslint": "^7.2.0", 53 | "eslint-plugin-ember": "^8.4.0", 54 | "eslint-plugin-node": "^11.1.0", 55 | "fs-extra": "^9.0.1", 56 | "loader.js": "^4.7.0", 57 | "npm-run-all": "^4.1.5", 58 | "qunit-dom": "^1.2.0", 59 | "release-it": "^13.6.0", 60 | "release-it-lerna-changelog": "^2.3.0" 61 | }, 62 | "engines": { 63 | "node": "10.* || >= 12" 64 | }, 65 | "publishConfig": { 66 | "registry": "https://registry.npmjs.org" 67 | }, 68 | "ember": { 69 | "edition": "octane" 70 | }, 71 | "ember-addon": { 72 | "configPath": "tests/dummy/config" 73 | }, 74 | "release-it": { 75 | "plugins": { 76 | "release-it-lerna-changelog": { 77 | "infile": "CHANGELOG.md", 78 | "launchEditor": false 79 | } 80 | }, 81 | "git": { 82 | "tagName": "v${version}" 83 | }, 84 | "github": { 85 | "release": true, 86 | "tokenRef": "GITHUB_AUTH" 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /testem.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | test_page: 'tests/index.html?hidepassed', 5 | disable_watching: true, 6 | launch_in_ci: [ 7 | 'Chrome' 8 | ], 9 | launch_in_dev: [ 10 | 'Chrome' 11 | ], 12 | browser_start_timeout: 120, 13 | browser_args: { 14 | Chrome: { 15 | ci: [ 16 | // --no-sandbox is needed when running Chrome inside a container 17 | process.env.CI ? '--no-sandbox' : null, 18 | '--headless', 19 | '--disable-dev-shm-usage', 20 | '--disable-software-rasterizer', 21 | '--mute-audio', 22 | '--remote-debugging-port=0', 23 | '--window-size=1440,900' 24 | ].filter(Boolean) 25 | } 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /tests/dummy/app/app.js: -------------------------------------------------------------------------------- 1 | import Application from '@ember/application'; 2 | import Resolver from 'ember-resolver'; 3 | import loadInitializers from 'ember-load-initializers'; 4 | import config from './config/environment'; 5 | 6 | export default class App extends Application { 7 | modulePrefix = config.modulePrefix; 8 | podModulePrefix = config.podModulePrefix; 9 | Resolver = Resolver; 10 | } 11 | 12 | loadInitializers(App, config.modulePrefix); 13 | -------------------------------------------------------------------------------- /tests/dummy/app/components/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shipshapecode/ember-cli-netlify/a57964bdc7c1f0b90e8883316a1c845e9da163fa/tests/dummy/app/components/.gitkeep -------------------------------------------------------------------------------- /tests/dummy/app/controllers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shipshapecode/ember-cli-netlify/a57964bdc7c1f0b90e8883316a1c845e9da163fa/tests/dummy/app/controllers/.gitkeep -------------------------------------------------------------------------------- /tests/dummy/app/helpers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shipshapecode/ember-cli-netlify/a57964bdc7c1f0b90e8883316a1c845e9da163fa/tests/dummy/app/helpers/.gitkeep -------------------------------------------------------------------------------- /tests/dummy/app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Dummy 7 | 8 | 9 | 10 | {{content-for "head"}} 11 | 12 | 13 | 14 | 15 | {{content-for "head-footer"}} 16 | 17 | 18 | {{content-for "body"}} 19 | 20 | 21 | 22 | 23 | {{content-for "body-footer"}} 24 | 25 | 26 | -------------------------------------------------------------------------------- /tests/dummy/app/models/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shipshapecode/ember-cli-netlify/a57964bdc7c1f0b90e8883316a1c845e9da163fa/tests/dummy/app/models/.gitkeep -------------------------------------------------------------------------------- /tests/dummy/app/router.js: -------------------------------------------------------------------------------- 1 | import EmberRouter from '@ember/routing/router'; 2 | import config from './config/environment'; 3 | 4 | export default class Router extends EmberRouter { 5 | location = config.locationType; 6 | rootURL = config.rootURL; 7 | } 8 | 9 | Router.map(function() { 10 | }); 11 | -------------------------------------------------------------------------------- /tests/dummy/app/routes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shipshapecode/ember-cli-netlify/a57964bdc7c1f0b90e8883316a1c845e9da163fa/tests/dummy/app/routes/.gitkeep -------------------------------------------------------------------------------- /tests/dummy/app/styles/app.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shipshapecode/ember-cli-netlify/a57964bdc7c1f0b90e8883316a1c845e9da163fa/tests/dummy/app/styles/app.css -------------------------------------------------------------------------------- /tests/dummy/app/templates/application.hbs: -------------------------------------------------------------------------------- 1 |

Welcome to Ember

2 | 3 | {{outlet}} -------------------------------------------------------------------------------- /tests/dummy/config/ember-cli-update.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": "1.0.0", 3 | "packages": [ 4 | { 5 | "name": "ember-cli", 6 | "version": "3.18.0", 7 | "blueprints": [ 8 | { 9 | "name": "addon", 10 | "outputRepo": "https://github.com/ember-cli/ember-addon-output", 11 | "codemodsSource": "ember-addon-codemods-manifest@1", 12 | "isBaseBlueprint": true, 13 | "options": [ 14 | "--yarn", 15 | "--no-welcome" 16 | ] 17 | } 18 | ] 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /tests/dummy/config/environment.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(environment) { 4 | let ENV = { 5 | modulePrefix: 'dummy', 6 | environment, 7 | rootURL: '/', 8 | locationType: 'auto', 9 | EmberENV: { 10 | FEATURES: { 11 | // Here you can enable experimental features on an ember canary build 12 | // e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true 13 | }, 14 | EXTEND_PROTOTYPES: { 15 | // Prevent Ember Data from overriding Date.parse. 16 | Date: false 17 | } 18 | }, 19 | 20 | APP: { 21 | // Here you can pass flags/options to your application instance 22 | // when it is created 23 | } 24 | }; 25 | 26 | if (environment === 'development') { 27 | // ENV.APP.LOG_RESOLVER = true; 28 | // ENV.APP.LOG_ACTIVE_GENERATION = true; 29 | // ENV.APP.LOG_TRANSITIONS = true; 30 | // ENV.APP.LOG_TRANSITIONS_INTERNAL = true; 31 | // ENV.APP.LOG_VIEW_LOOKUPS = true; 32 | } 33 | 34 | if (environment === 'test') { 35 | // Testem prefers this... 36 | ENV.locationType = 'none'; 37 | 38 | // keep test console output quieter 39 | ENV.APP.LOG_ACTIVE_GENERATION = false; 40 | ENV.APP.LOG_VIEW_LOOKUPS = false; 41 | 42 | ENV.APP.rootElement = '#ember-testing'; 43 | ENV.APP.autoboot = false; 44 | } 45 | 46 | if (environment === 'production') { 47 | // here you can enable a production-specific feature 48 | } 49 | 50 | return ENV; 51 | }; 52 | -------------------------------------------------------------------------------- /tests/dummy/config/optional-features.json: -------------------------------------------------------------------------------- 1 | { 2 | "application-template-wrapper": false, 3 | "default-async-observers": true, 4 | "jquery-integration": false, 5 | "template-only-glimmer-components": true 6 | } 7 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /tests/dummy/public/robots.txt: -------------------------------------------------------------------------------- 1 | # http://www.robotstxt.org 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /tests/helpers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shipshapecode/ember-cli-netlify/a57964bdc7c1f0b90e8883316a1c845e9da163fa/tests/helpers/.gitkeep -------------------------------------------------------------------------------- /tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Dummy Tests 7 | 8 | 9 | 10 | {{content-for "head"}} 11 | {{content-for "test-head"}} 12 | 13 | 14 | 15 | 16 | 17 | {{content-for "head-footer"}} 18 | {{content-for "test-head-footer"}} 19 | 20 | 21 | {{content-for "body"}} 22 | {{content-for "test-body"}} 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | {{content-for "body-footer"}} 31 | {{content-for "test-body-footer"}} 32 | 33 | 34 | -------------------------------------------------------------------------------- /tests/integration/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shipshapecode/ember-cli-netlify/a57964bdc7c1f0b90e8883316a1c845e9da163fa/tests/integration/.gitkeep -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /tests/unit/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shipshapecode/ember-cli-netlify/a57964bdc7c1f0b90e8883316a1c845e9da163fa/tests/unit/.gitkeep --------------------------------------------------------------------------------