├── blueprints
├── addon
│ └── files
│ │ ├── addon
│ │ └── .gitkeep
│ │ ├── app
│ │ └── .gitkeep
│ │ ├── index.js
│ │ ├── addon-config
│ │ ├── environment.js
│ │ └── ember-try.js
│ │ ├── npmignore
│ │ ├── ember-cli-build.js
│ │ ├── README.md
│ │ ├── .travis.yml
│ │ └── LICENSE.md
├── app
│ ├── files
│ │ ├── vendor
│ │ │ └── .gitkeep
│ │ ├── app
│ │ │ ├── helpers
│ │ │ │ └── .gitkeep
│ │ │ ├── models
│ │ │ │ └── .gitkeep
│ │ │ ├── routes
│ │ │ │ └── .gitkeep
│ │ │ ├── styles
│ │ │ │ └── app.css
│ │ │ ├── components
│ │ │ │ └── .gitkeep
│ │ │ ├── controllers
│ │ │ │ └── .gitkeep
│ │ │ ├── templates
│ │ │ │ ├── components
│ │ │ │ │ └── .gitkeep
│ │ │ │ └── application.hbs
│ │ │ ├── resolver.js
│ │ │ ├── router.js
│ │ │ ├── app.js
│ │ │ └── index.html
│ │ ├── tests
│ │ │ ├── unit
│ │ │ │ └── .gitkeep
│ │ │ ├── integration
│ │ │ │ └── .gitkeep
│ │ │ ├── test-helper.js
│ │ │ ├── helpers
│ │ │ │ ├── destroy-app.js
│ │ │ │ ├── resolver.js
│ │ │ │ ├── start-app.js
│ │ │ │ └── module-for-acceptance.js
│ │ │ ├── .jshintrc
│ │ │ └── index.html
│ │ ├── .watchmanconfig
│ │ ├── public
│ │ │ ├── robots.txt
│ │ │ └── crossdomain.xml
│ │ ├── .bowerrc
│ │ ├── bower.json
│ │ ├── testem.js
│ │ ├── .ember-cli
│ │ ├── gitignore
│ │ ├── .travis.yml
│ │ ├── .jshintrc
│ │ ├── .editorconfig
│ │ └── ember-cli-build.js
│ └── index.js
├── template
│ ├── files
│ │ └── __root__
│ │ │ └── __path__
│ │ │ └── __name__.hbs
│ └── index.js
├── blueprint
│ ├── files
│ │ └── blueprints
│ │ │ ├── __name__
│ │ │ ├── files
│ │ │ │ └── .gitkeep
│ │ │ └── index.js
│ │ │ └── .jshintrc
│ └── index.js
├── server
│ ├── files
│ │ └── server
│ │ │ ├── .jshintrc
│ │ │ └── index.js
│ └── index.js
├── component
│ └── files
│ │ └── __root__
│ │ ├── __templatepath__
│ │ └── __templatename__.hbs
│ │ └── __path__
│ │ └── __name__.js
├── route
│ └── files
│ │ └── __root__
│ │ ├── __templatepath__
│ │ └── __templatename__.hbs
│ │ └── __path__
│ │ └── __name__.js
├── lib
│ ├── files
│ │ └── lib
│ │ │ └── .jshintrc
│ └── index.js
├── addon-import
│ └── files
│ │ └── __root__
│ │ └── __path__
│ │ └── __name__.js
├── component-addon
│ └── files
│ │ └── __root__
│ │ └── __path__
│ │ └── __name__.js
├── helper-addon
│ ├── index.js
│ └── files
│ │ └── __root__
│ │ └── __path__
│ │ └── __name__.js
├── route-addon
│ └── files
│ │ └── __root__
│ │ ├── __path__
│ │ └── __name__.js
│ │ └── __templatepath__
│ │ └── __templatename__.js
├── initializer-addon
│ ├── index.js
│ └── files
│ │ └── __root__
│ │ └── __path__
│ │ └── __name__.js
├── .eslintrc.js
├── instance-initializer-addon
│ ├── index.js
│ └── files
│ │ └── __root__
│ │ └── __path__
│ │ └── __name__.js
├── mixin
│ ├── index.js
│ └── files
│ │ └── __root__
│ │ └── mixins
│ │ └── __name__.js
├── service
│ ├── index.js
│ └── files
│ │ └── __root__
│ │ └── __path__
│ │ └── __name__.js
├── util
│ ├── files
│ │ └── __root__
│ │ │ └── utils
│ │ │ └── __name__.js
│ └── index.js
├── controller
│ ├── index.js
│ └── files
│ │ └── __root__
│ │ └── __path__
│ │ └── __name__.js
├── initializer
│ ├── index.js
│ └── files
│ │ └── __root__
│ │ └── initializers
│ │ └── __name__.js
├── test-helper
│ ├── index.js
│ └── files
│ │ └── tests
│ │ └── helpers
│ │ └── __name__.js
├── adapter
│ └── files
│ │ └── __root__
│ │ └── __path__
│ │ └── __name__.js
├── serializer
│ ├── index.js
│ └── files
│ │ └── __root__
│ │ └── __path__
│ │ └── __name__.js
├── transform
│ ├── index.js
│ └── files
│ │ └── __root__
│ │ └── __path__
│ │ └── __name__.js
├── instance-initializer
│ ├── index.js
│ └── files
│ │ └── __root__
│ │ └── instance-initializers
│ │ └── __name__.js
├── model
│ ├── files
│ │ └── __root__
│ │ │ └── __path__
│ │ │ └── __name__.js
│ └── HELP.md
├── in-repo-addon
│ └── files
│ │ └── lib
│ │ └── __name__
│ │ ├── package.json
│ │ └── index.js
├── helper
│ ├── files
│ │ └── __root__
│ │ │ └── helpers
│ │ │ └── __name__.js
│ └── index.js
├── vendor-shim
│ ├── files
│ │ └── vendor
│ │ │ └── shims
│ │ │ └── __name__.js
│ └── index.js
├── route-test
│ ├── index.js
│ └── files
│ │ └── tests
│ │ └── unit
│ │ └── __path__
│ │ └── __test__.js
├── service-test
│ ├── index.js
│ └── files
│ │ └── tests
│ │ └── unit
│ │ └── __path__
│ │ └── __test__.js
├── transform-test
│ ├── index.js
│ └── files
│ │ └── tests
│ │ └── unit
│ │ └── __path__
│ │ └── __test__.js
├── adapter-test
│ ├── index.js
│ └── files
│ │ └── tests
│ │ └── unit
│ │ └── __path__
│ │ └── __test__.js
├── controller-test
│ ├── index.js
│ └── files
│ │ └── tests
│ │ └── unit
│ │ └── __path__
│ │ └── __test__.js
├── serializer-test
│ ├── index.js
│ └── files
│ │ └── tests
│ │ └── unit
│ │ └── __path__
│ │ └── __test__.js
├── util-test
│ ├── files
│ │ └── tests
│ │ │ └── unit
│ │ │ └── utils
│ │ │ └── __name__-test.js
│ └── index.js
├── helper-test
│ ├── files
│ │ └── tests
│ │ │ └── unit
│ │ │ └── helpers
│ │ │ └── __name__-test.js
│ └── index.js
├── mixin-test
│ ├── index.js
│ └── files
│ │ └── tests
│ │ └── unit
│ │ └── mixins
│ │ └── __name__-test.js
├── model-test
│ ├── files
│ │ └── tests
│ │ │ └── unit
│ │ │ └── __path__
│ │ │ └── __test__.js
│ └── index.js
├── acceptance-test
│ ├── files
│ │ └── tests
│ │ │ └── acceptance
│ │ │ └── __name__-test.js
│ └── index.js
├── initializer-test
│ ├── index.js
│ └── files
│ │ └── tests
│ │ └── unit
│ │ └── initializers
│ │ └── __name__-test.js
├── instance-initializer-test
│ ├── index.js
│ └── files
│ │ └── tests
│ │ └── unit
│ │ └── instance-initializers
│ │ └── __name__-test.js
├── http-proxy
│ ├── files
│ │ └── server
│ │ │ └── proxies
│ │ │ └── __name__.js
│ └── index.js
└── http-mock
│ └── index.js
├── dev
├── windows
│ ├── .gitignore
│ ├── README.md
│ ├── Vagrantfile
│ └── install.ps1
├── generate-docs.js
├── prepare-release
└── linux
│ ├── Dockerfile
│ └── README.md
├── tests
├── fixtures
│ ├── addon
│ │ ├── no-config
│ │ │ └── .gitkeep
│ │ ├── shared-package
│ │ │ ├── base
│ │ │ │ ├── .gitkeep
│ │ │ │ └── node_modules
│ │ │ │ │ ├── blah-blah
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── package.json
│ │ │ │ │ ├── foo-bar
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── package.json
│ │ │ │ │ └── invalid-package
│ │ │ │ │ └── package.json
│ │ │ └── node_modules
│ │ │ │ └── dev-foo-bar
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ ├── with-empty-addon-templates
│ │ │ └── addon
│ │ │ │ └── templates
│ │ │ │ └── .gitkeep
│ │ ├── simple
│ │ │ ├── node_modules
│ │ │ │ ├── ember-random-addon
│ │ │ │ │ ├── blueprints
│ │ │ │ │ │ └── .gitkeep
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── package.json
│ │ │ │ ├── ember-after-blueprint-addon
│ │ │ │ │ ├── blueprints
│ │ │ │ │ │ └── .gitkeep
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── package.json
│ │ │ │ ├── ember-before-blueprint-addon
│ │ │ │ │ ├── blueprints
│ │ │ │ │ │ └── .gitkeep
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── package.json
│ │ │ │ ├── ember-generated-with-export-addon
│ │ │ │ │ ├── addon
│ │ │ │ │ │ ├── mixins
│ │ │ │ │ │ │ └── thing.js
│ │ │ │ │ │ └── controllers
│ │ │ │ │ │ │ └── people.js
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── package.json
│ │ │ │ ├── ember-non-root-addon
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── ember-index.js
│ │ │ │ │ └── package.json
│ │ │ │ ├── ember-devDeps-addon
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── node_modules
│ │ │ │ │ │ └── ember-cli-nested
│ │ │ │ │ │ │ └── package.json
│ │ │ │ │ └── package.json
│ │ │ │ ├── ember-addon-with-dependencies
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── package.json
│ │ │ │ ├── something-else
│ │ │ │ │ └── package.json
│ │ │ │ └── non-ember-thingy
│ │ │ │ │ └── package.json
│ │ │ ├── lib
│ │ │ │ └── ember-super-button
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── lib
│ │ │ │ │ └── ember-ng
│ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ └── package.json
│ │ │ │ │ ├── node_modules
│ │ │ │ │ └── ember-yagni
│ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ └── package.json
│ │ │ │ │ └── package.json
│ │ │ ├── bower.json
│ │ │ └── package.json
│ │ ├── with-addon-templates
│ │ │ └── addon
│ │ │ │ └── templates
│ │ │ │ └── test.hbs
│ │ ├── with-styles
│ │ │ └── addon
│ │ │ │ └── styles
│ │ │ │ └── app.css
│ │ ├── with-addon-pod-templates
│ │ │ └── addon
│ │ │ │ └── components
│ │ │ │ └── some-foo
│ │ │ │ └── template.hbs
│ │ ├── with-addon-test-support
│ │ │ ├── tests
│ │ │ │ ├── dummy
│ │ │ │ │ └── app
│ │ │ │ │ │ └── templates
│ │ │ │ │ │ └── application.hbs
│ │ │ │ └── acceptance
│ │ │ │ │ └── main-test.js
│ │ │ └── addon-test-support
│ │ │ │ └── current-text.js
│ │ ├── with-app-styles
│ │ │ ├── app
│ │ │ │ └── styles
│ │ │ │ │ └── foo-bar.css
│ │ │ └── package.json
│ │ ├── with-dummy-public
│ │ │ └── tests
│ │ │ │ └── dummy
│ │ │ │ └── public
│ │ │ │ └── robots.txt
│ │ ├── with-linting-errors
│ │ │ └── addon
│ │ │ │ └── index.js
│ │ ├── pod-templates-only
│ │ │ ├── addon
│ │ │ │ └── components
│ │ │ │ │ └── my-component
│ │ │ │ │ ├── template.hbs
│ │ │ │ │ └── component.js
│ │ │ └── app
│ │ │ │ └── components
│ │ │ │ └── my-component.js
│ │ ├── developing-addon
│ │ │ ├── addon
│ │ │ │ ├── templates
│ │ │ │ │ └── components
│ │ │ │ │ │ └── simple-component.hbs
│ │ │ │ └── components
│ │ │ │ │ └── simple-component.js
│ │ │ ├── app
│ │ │ │ └── components
│ │ │ │ │ └── simple-component.js
│ │ │ ├── index.js
│ │ │ └── package.json
│ │ ├── component-with-template
│ │ │ ├── addon
│ │ │ │ ├── index.js
│ │ │ │ ├── templates
│ │ │ │ │ └── components
│ │ │ │ │ │ └── basic-thing.hbs
│ │ │ │ └── components
│ │ │ │ │ └── basic-thing.js
│ │ │ ├── app
│ │ │ │ └── components
│ │ │ │ │ └── basic-thing.js
│ │ │ └── tests
│ │ │ │ ├── dummy
│ │ │ │ └── app
│ │ │ │ │ ├── templates
│ │ │ │ │ └── application.hbs
│ │ │ │ │ └── components
│ │ │ │ │ └── second-thing.js
│ │ │ │ └── acceptance
│ │ │ │ └── main-test.js
│ │ ├── env-addons
│ │ │ ├── node_modules
│ │ │ │ ├── ember-random-addon
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── package.json
│ │ │ │ └── ember-foo-env-addon
│ │ │ │ │ ├── package.json
│ │ │ │ │ └── index.js
│ │ │ └── package.json
│ │ ├── with-config
│ │ │ └── config
│ │ │ │ └── environment.js
│ │ ├── content-for-head
│ │ │ └── index.js
│ │ ├── with-blueprint-override
│ │ │ └── blueprints
│ │ │ │ └── component
│ │ │ │ ├── index.js
│ │ │ │ └── files
│ │ │ │ └── __root__
│ │ │ │ └── __path__
│ │ │ │ └── __name__.js
│ │ └── commands
│ │ │ ├── addon-command.js
│ │ │ ├── other-addon-command.js
│ │ │ ├── addon-command-class.js
│ │ │ └── addon-override-intentional.js
│ ├── blueprints
│ │ ├── basic
│ │ │ ├── files
│ │ │ │ ├── bar
│ │ │ │ ├── .gitignore
│ │ │ │ ├── foo.txt
│ │ │ │ ├── test.txt
│ │ │ │ └── .ember-cli
│ │ │ └── index.js
│ │ ├── basic_2
│ │ │ ├── files
│ │ │ │ ├── .gitignore
│ │ │ │ ├── foo.txt
│ │ │ │ ├── test.txt
│ │ │ │ └── .ember-cli
│ │ │ └── index.js
│ │ ├── .notablueprint
│ │ ├── with-templating
│ │ │ ├── files
│ │ │ │ ├── foo.txt
│ │ │ │ └── with-undefined-variable.txt
│ │ │ └── index.js
│ │ └── exporting-object
│ │ │ └── index.js
│ ├── app
│ │ ├── without-ember-debug
│ │ │ ├── .gitkeep
│ │ │ ├── bower_components
│ │ │ │ └── ember
│ │ │ │ │ └── ember.js
│ │ │ └── package.json
│ │ └── with-default-ember-debug
│ │ │ ├── .gitkeep
│ │ │ ├── bower_components
│ │ │ └── ember
│ │ │ │ └── ember.debug.js
│ │ │ └── package.json
│ ├── brocfile-tests
│ │ ├── app-import
│ │ │ ├── .gitkeep
│ │ │ └── node_modules
│ │ │ │ ├── ember-bad-addon
│ │ │ │ ├── vendor
│ │ │ │ │ └── ember-bad-addon
│ │ │ │ │ │ └── file-to-import.js
│ │ │ │ ├── package.json
│ │ │ │ └── index.js
│ │ │ │ └── ember-random-addon
│ │ │ │ ├── vendor
│ │ │ │ └── ember-random-addon
│ │ │ │ │ └── file-to-import.txt
│ │ │ │ ├── package.json
│ │ │ │ └── index.js
│ │ ├── public-tree
│ │ │ ├── .gitkeep
│ │ │ └── node_modules
│ │ │ │ └── ember-random-addon
│ │ │ │ ├── public
│ │ │ │ └── some-root-file.txt
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ ├── app-test-import
│ │ │ ├── .gitkeep
│ │ │ └── node_modules
│ │ │ │ └── ember-test-addon
│ │ │ │ └── package.json
│ │ ├── multiple-css-files
│ │ │ └── app
│ │ │ │ └── styles
│ │ │ │ ├── app.css
│ │ │ │ └── other.css
│ │ ├── jshint-addon
│ │ │ └── lib
│ │ │ │ └── ember-random-thing
│ │ │ │ ├── app
│ │ │ │ └── routes
│ │ │ │ │ └── .gitkeep
│ │ │ │ ├── test-support
│ │ │ │ └── unit
│ │ │ │ │ └── routes
│ │ │ │ │ └── .gitkeep
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ ├── query
│ │ │ ├── app
│ │ │ │ ├── resolver.js
│ │ │ │ ├── pods
│ │ │ │ │ └── application
│ │ │ │ │ │ └── template.hbs
│ │ │ │ └── app.js
│ │ │ └── package.json
│ │ ├── both-build-files
│ │ │ ├── vendor
│ │ │ │ └── brocfile-script.js
│ │ │ ├── Brocfile.js
│ │ │ └── ember-cli-build.js
│ │ ├── multiple-sass-files
│ │ │ ├── app
│ │ │ │ └── styles
│ │ │ │ │ ├── app.scss
│ │ │ │ │ ├── main.scss
│ │ │ │ │ └── theme
│ │ │ │ │ └── a.scss
│ │ │ ├── node_modules
│ │ │ │ └── broccoli-sass
│ │ │ │ │ └── package.json
│ │ │ └── ember-cli-build.js
│ │ ├── styles-and-templates-stripped
│ │ │ └── app
│ │ │ │ ├── styles
│ │ │ │ └── foo.js
│ │ │ │ ├── templates
│ │ │ │ └── bar.js
│ │ │ │ ├── styles-manager.js
│ │ │ │ └── templates-stuff.js
│ │ ├── app-import-with-legacy-files
│ │ │ ├── vendor
│ │ │ │ ├── legacy-file.js
│ │ │ │ ├── second-legacy-file.js
│ │ │ │ └── legacy-file.css
│ │ │ └── ember-cli-build.js
│ │ ├── pods-templates
│ │ │ ├── app
│ │ │ │ └── application
│ │ │ │ │ └── template.hbs
│ │ │ └── tests
│ │ │ │ └── integration
│ │ │ │ └── pods-template-test.js
│ │ ├── pods-with-prefix-templates
│ │ │ ├── app
│ │ │ │ ├── resolver.js
│ │ │ │ ├── pods
│ │ │ │ │ └── application
│ │ │ │ │ │ └── template.hbs
│ │ │ │ └── app.js
│ │ │ └── tests
│ │ │ │ └── integration
│ │ │ │ └── pods-template-test.js
│ │ ├── app-import-output-file
│ │ │ ├── vendor
│ │ │ │ ├── custom-output-file.js
│ │ │ │ └── custom-output-file.css
│ │ │ └── ember-cli-build.js
│ │ ├── no-ember-cli-build
│ │ │ └── Brocfile.js
│ │ ├── custom-ember-env
│ │ │ └── config
│ │ │ │ └── environment.js
│ │ ├── custom-environment-config
│ │ │ ├── config
│ │ │ │ ├── environment.js
│ │ │ │ └── something-else.js
│ │ │ ├── tests
│ │ │ │ └── unit
│ │ │ │ │ └── config-test.js
│ │ │ └── ember-cli-build.js
│ │ ├── auto-run-false
│ │ │ └── ember-cli-build.js
│ │ ├── auto-run-true
│ │ │ └── ember-cli-build.js
│ │ ├── wrap-in-eval
│ │ │ ├── ember-cli-build.js
│ │ │ └── tests
│ │ │ │ └── integration
│ │ │ │ └── wrap-in-eval-test.js
│ │ ├── custom-output-paths
│ │ │ └── ember-cli-build.js
│ │ └── default-development
│ │ │ └── tests
│ │ │ └── integration
│ │ │ └── app-boots-test.js
│ ├── installation-checker
│ │ ├── empty
│ │ │ └── .gitkeep
│ │ ├── invalid-bower-and-npm
│ │ │ ├── bower.json
│ │ │ └── package.json
│ │ ├── invalid-bower-installation
│ │ │ └── bower.json
│ │ ├── invalid-npm-installation
│ │ │ └── package.json
│ │ ├── valid-npm-installation
│ │ │ ├── package.json
│ │ │ └── node_modules
│ │ │ │ └── .gitkeep
│ │ ├── valid-bower-installation
│ │ │ ├── bower_components
│ │ │ │ └── .gitkeep
│ │ │ └── bower.json
│ │ └── valid-bower-empty-installation
│ │ │ └── bower.json
│ ├── bower-directory-tests
│ │ ├── no-bowerrc
│ │ │ └── .gitkeep
│ │ ├── bowerrc-without-directory
│ │ │ └── .bowerrc
│ │ ├── invalid-bowerrc
│ │ │ └── .bowerrc
│ │ └── bowerrc-with-directory
│ │ │ └── .bowerrc
│ ├── express-server
│ │ ├── index.html
│ │ ├── test-file.txt
│ │ ├── tests
│ │ │ ├── test-file.txt
│ │ │ └── index.html
│ │ └── someurl-without-period
│ ├── project
│ │ └── .ember-cli
│ ├── restart-express-server
│ │ ├── app-root
│ │ │ ├── foo.txt
│ │ │ └── server
│ │ │ │ ├── subfolder
│ │ │ │ ├── a.js
│ │ │ │ └── b.js
│ │ │ │ └── index.js
│ │ ├── copy1
│ │ │ └── subfolder
│ │ │ │ ├── a.js
│ │ │ │ ├── b.js
│ │ │ │ └── c.js
│ │ ├── copy2
│ │ │ ├── subfolder
│ │ │ │ ├── a.js
│ │ │ │ └── b.js
│ │ │ └── index.js
│ │ └── copy3
│ │ │ └── index.js
│ ├── smoke-tests
│ │ ├── with-template-failing-linting
│ │ │ ├── app
│ │ │ │ ├── pod-template
│ │ │ │ │ └── template.hbs
│ │ │ │ └── templates
│ │ │ │ │ ├── blah.hbs
│ │ │ │ │ └── foo-bar.hbs
│ │ │ └── node_modules
│ │ │ │ └── fake-template-linter
│ │ │ │ └── package.json
│ │ ├── no-testem-launchers
│ │ │ └── testem.json
│ │ ├── test-with-syntax-error
│ │ │ └── tests
│ │ │ │ └── unit
│ │ │ │ └── some-test.js
│ │ ├── passing-test
│ │ │ └── tests
│ │ │ │ ├── unit
│ │ │ │ └── some-test.js
│ │ │ │ └── acceptance
│ │ │ │ └── acceptance-test.js
│ │ ├── failing-test
│ │ │ └── tests
│ │ │ │ └── unit
│ │ │ │ └── some-test.js
│ │ └── js-testem-config
│ │ │ └── testem.js
│ ├── with-styles
│ │ └── app
│ │ │ └── styles
│ │ │ ├── some-styles.css
│ │ │ ├── app.css
│ │ │ └── some-other-styles.css
│ ├── file-info
│ │ └── interpolate.txt
│ ├── preprocessor-tests
│ │ ├── app-registry-ordering
│ │ │ ├── app
│ │ │ │ ├── styles
│ │ │ │ │ └── app.scss
│ │ │ │ └── components
│ │ │ │ │ └── should-be-preprocessed.js
│ │ │ └── node_modules
│ │ │ │ ├── first-dummy-preprocessor
│ │ │ │ ├── package.json
│ │ │ │ └── index.js
│ │ │ │ └── second-dummy-preprocessor
│ │ │ │ ├── package.json
│ │ │ │ └── index.js
│ │ ├── app-with-addon-with-preprocessors
│ │ │ ├── app
│ │ │ │ └── styles
│ │ │ │ │ └── app.scss
│ │ │ └── node_modules
│ │ │ │ ├── ember-cool-addon
│ │ │ │ ├── addon
│ │ │ │ │ └── styles
│ │ │ │ │ │ └── addon.scss
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ │ └── broccoli-sass
│ │ │ │ └── package.json
│ │ ├── app-with-addon-with-preprocessors-2
│ │ │ ├── app
│ │ │ │ ├── styles
│ │ │ │ │ └── app.scss
│ │ │ │ └── components
│ │ │ │ │ └── should-not-be-preprocessed.js
│ │ │ └── node_modules
│ │ │ │ └── ember-cool-addon
│ │ │ │ ├── index.js
│ │ │ │ ├── addon
│ │ │ │ └── components
│ │ │ │ │ └── clitest-example.js
│ │ │ │ ├── package.json
│ │ │ │ └── node_modules
│ │ │ │ └── dummy-preprocessor
│ │ │ │ ├── package.json
│ │ │ │ └── index.js
│ │ ├── app-with-addon-with-preprocessors-3
│ │ │ ├── app
│ │ │ │ ├── styles
│ │ │ │ │ └── app.scss
│ │ │ │ └── components
│ │ │ │ │ └── should-not-be-preprocessed.js
│ │ │ └── node_modules
│ │ │ │ └── ember-shallow-addon
│ │ │ │ ├── index.js
│ │ │ │ ├── node_modules
│ │ │ │ └── ember-deep-addon
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── addon
│ │ │ │ │ └── components
│ │ │ │ │ │ └── clitest-deep-example.js
│ │ │ │ │ ├── package.json
│ │ │ │ │ └── node_modules
│ │ │ │ │ └── dummy-preprocessor
│ │ │ │ │ └── package.json
│ │ │ │ ├── package.json
│ │ │ │ └── addon
│ │ │ │ └── components
│ │ │ │ └── clitest-shallow-example.js
│ │ └── app-with-addon-without-preprocessors
│ │ │ ├── app
│ │ │ └── styles
│ │ │ │ └── app.scss
│ │ │ └── node_modules
│ │ │ └── ember-cool-addon
│ │ │ ├── addon
│ │ │ └── styles
│ │ │ │ └── addon.css
│ │ │ ├── index.js
│ │ │ └── package.json
│ ├── missing-before-addon
│ │ ├── lib
│ │ │ └── sample-addon
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ └── package.json
│ ├── markdown
│ │ └── foo.md
│ ├── problem-binary.png
│ ├── home
│ │ └── .ember-cli
│ ├── tasks
│ │ └── testem-config
│ │ │ ├── testem.json
│ │ │ └── testem-with-query-string.json
│ ├── help
│ │ ├── foo.txt
│ │ └── foo.js
│ ├── project-with-handlebars
│ │ ├── package.json
│ │ └── bower.json
│ ├── leek-config
│ │ └── .ember-cli
│ ├── generate
│ │ ├── acceptance-test-expected.js
│ │ ├── addon-acceptance-test-expected.js
│ │ └── addon-acceptance-test-nested-expected.js
│ ├── dummy-project-outdated
│ │ └── package.json
│ └── ssl
│ │ └── server.crt
├── helpers
│ ├── convert-help-output-to-json.js
│ ├── kill-cli-process.js
│ ├── process-help-string.js
│ ├── conf.js
│ ├── copy-fixture-files.js
│ ├── build-error.js
│ ├── proxy-server.js
│ ├── mock-analytics.js
│ ├── tmp.js
│ ├── mock-watcher.js
│ ├── mock-express-server.js
│ ├── mock-server-watcher.js
│ ├── log-on-failure.js
│ ├── file-utils.js
│ └── stub.js
├── unit
│ ├── lint-test.js
│ ├── errors
│ │ └── silent-test.js
│ ├── utilities
│ │ ├── get-package-base-name-test.js
│ │ ├── git-repo-test.js
│ │ ├── version-utils-test.js
│ │ ├── valid-project-name-test.js
│ │ ├── attempt-never-index-test.js
│ │ ├── doc-generator-test.js
│ │ └── windows-admin-test.js
│ ├── settings-file
│ │ └── leek-options-test.js
│ ├── blueprints
│ │ └── component-test.js
│ └── analytics-test.js
├── .eslintrc.js
├── acceptance
│ └── missing-before-addon-test.js
└── factories
│ └── command-options.js
├── .npmignore
├── lib
├── broccoli
│ ├── app-boot.js
│ ├── app-suffix.js
│ ├── vendor-suffix.js
│ ├── test-support-prefix.js
│ ├── app-prefix.js
│ ├── tests-suffix.js
│ ├── vendor-prefix.js
│ ├── app-config.js
│ ├── test-support-suffix.js
│ ├── merge-trees.js
│ ├── app-config-from-meta.js
│ └── testem.js
├── tasks
│ ├── server
│ │ └── middleware
│ │ │ ├── proxy-server
│ │ │ └── package.json
│ │ │ ├── serve-files
│ │ │ └── package.json
│ │ │ ├── history-support
│ │ │ └── package.json
│ │ │ └── tests-server
│ │ │ └── package.json
│ ├── destroy-from-blueprint.js
│ ├── npm-install.js
│ ├── npm-uninstall.js
│ └── build-watch.js
├── utilities
│ ├── normalize-blueprint-option.js
│ ├── require-local.js
│ ├── get-package-base-name.js
│ ├── get-dependency-depth.js
│ ├── parse-options.js
│ ├── get-component-path-option.js
│ ├── valid-project-name.js
│ ├── get-option-args.js
│ ├── valid-component-name.js
│ ├── deprecate.js
│ ├── attempt-never-index.js
│ ├── find-build-file.js
│ ├── mk-tmp-dir-in.js
│ ├── version-utils.js
│ ├── doc-generator.js
│ ├── printable-properties.js
│ ├── merge-blueprint-options.js
│ ├── sequence.js
│ ├── platform-checker.js
│ ├── require-as-hash.js
│ ├── path.js
│ └── npm.js
├── models
│ └── task.js
├── errors
│ └── silent.js
├── commands
│ ├── unknown.js
│ ├── install-addon.js
│ ├── uninstall-npm.js
│ ├── install-npm.js
│ ├── install-bower.js
│ ├── version.js
│ └── addon.js
└── ui
│ └── write-error.js
├── assets
└── architecture
│ ├── Ember-CLI architecture.png
│ └── README.md
├── .codeclimate.yml
├── .gitignore
├── .eslintignore
├── .editorconfig
├── docs
└── yuidoc.json
├── .gitattributes
├── CODE_OF_CONDUCT.md
├── .travis.yml
├── appveyor.yml
├── bin
└── ember
└── LICENSE.md
/blueprints/addon/files/addon/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/blueprints/addon/files/app/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/blueprints/app/files/vendor/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dev/windows/.gitignore:
--------------------------------------------------------------------------------
1 | .vagrant
2 |
--------------------------------------------------------------------------------
/blueprints/app/files/app/helpers/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/blueprints/app/files/app/models/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/blueprints/app/files/app/routes/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/blueprints/app/files/app/styles/app.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/blueprints/app/files/tests/unit/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/no-config/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/blueprints/basic/files/bar:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/blueprints/app/files/app/components/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/blueprints/app/files/app/controllers/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/blueprints/app/files/tests/integration/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/app/without-ember-debug/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/blueprints/basic/files/.gitignore:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/shared-package/base/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/app/with-default-ember-debug/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/blueprints/basic/files/foo.txt:
--------------------------------------------------------------------------------
1 | foo
2 |
--------------------------------------------------------------------------------
/tests/fixtures/blueprints/basic_2/files/.gitignore:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/app-import/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/public-tree/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/installation-checker/empty/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/blueprints/app/files/app/templates/components/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/blueprints/template/files/__root__/__path__/__name__.hbs:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/blueprints/.notablueprint:
--------------------------------------------------------------------------------
1 | not a blueprint
--------------------------------------------------------------------------------
/tests/fixtures/bower-directory-tests/no-bowerrc/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/app-test-import/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/express-server/index.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/blueprints/blueprint/files/blueprints/__name__/files/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/express-server/test-file.txt:
--------------------------------------------------------------------------------
1 | some contents
2 |
--------------------------------------------------------------------------------
/tests/fixtures/blueprints/basic_2/files/foo.txt:
--------------------------------------------------------------------------------
1 | foo (changes!!!)
2 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/multiple-css-files/app/styles/app.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/express-server/tests/test-file.txt:
--------------------------------------------------------------------------------
1 | some contents
2 |
--------------------------------------------------------------------------------
/tests/fixtures/installation-checker/invalid-bower-and-npm/bower.json:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/blueprints/server/files/server/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "node": true
3 | }
4 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/shared-package/base/node_modules/blah-blah/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/shared-package/base/node_modules/foo-bar/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/shared-package/node_modules/dev-foo-bar/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/with-empty-addon-templates/addon/templates/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/app/without-ember-debug/bower_components/ember/ember.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/multiple-css-files/app/styles/other.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/express-server/tests/index.html:
--------------------------------------------------------------------------------
1 | This here be test html
2 |
--------------------------------------------------------------------------------
/tests/fixtures/installation-checker/invalid-bower-and-npm/package.json:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/installation-checker/invalid-bower-installation/bower.json:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/installation-checker/invalid-npm-installation/package.json:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/installation-checker/valid-npm-installation/package.json:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/project/.ember-cli:
--------------------------------------------------------------------------------
1 | {
2 | "liveReload": false
3 | }
4 |
--------------------------------------------------------------------------------
/tests/fixtures/blueprints/basic/files/test.txt:
--------------------------------------------------------------------------------
1 | I AM <%= replacementTest %>
2 |
--------------------------------------------------------------------------------
/tests/fixtures/blueprints/basic_2/files/test.txt:
--------------------------------------------------------------------------------
1 | I AM TEST (changes!!!)
2 |
--------------------------------------------------------------------------------
/tests/fixtures/express-server/someurl-without-period:
--------------------------------------------------------------------------------
1 | some other content
2 |
--------------------------------------------------------------------------------
/tests/fixtures/restart-express-server/app-root/foo.txt:
--------------------------------------------------------------------------------
1 | Initial Contents
2 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/node_modules/ember-random-addon/blueprints/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/app/with-default-ember-debug/bower_components/ember/ember.debug.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/blueprints/with-templating/files/foo.txt:
--------------------------------------------------------------------------------
1 | Howdy <%= friend %>
2 |
--------------------------------------------------------------------------------
/tests/fixtures/bower-directory-tests/bowerrc-without-directory/.bowerrc:
--------------------------------------------------------------------------------
1 | {
2 | }
3 |
--------------------------------------------------------------------------------
/tests/fixtures/installation-checker/valid-npm-installation/node_modules/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/blueprints/app/files/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {
2 | "ignore_dirs": ["tmp", "dist"]
3 | }
4 |
--------------------------------------------------------------------------------
/blueprints/component/files/__root__/__templatepath__/__templatename__.hbs:
--------------------------------------------------------------------------------
1 | {{yield}}
2 |
--------------------------------------------------------------------------------
/blueprints/route/files/__root__/__templatepath__/__templatename__.hbs:
--------------------------------------------------------------------------------
1 | {{outlet}}
2 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/node_modules/ember-after-blueprint-addon/blueprints/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/with-addon-templates/addon/templates/test.hbs:
--------------------------------------------------------------------------------
1 |
Derp
2 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/jshint-addon/lib/ember-random-thing/app/routes/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/installation-checker/valid-bower-installation/bower_components/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/blueprints/lib/files/lib/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "node": true,
3 | "browser": false
4 | }
5 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/node_modules/ember-before-blueprint-addon/blueprints/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/node_modules/ember-generated-with-export-addon/addon/mixins/thing.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/with-styles/addon/styles/app.css:
--------------------------------------------------------------------------------
1 | /* addon/styles/app.css is present */
2 |
--------------------------------------------------------------------------------
/tests/fixtures/blueprints/with-templating/files/with-undefined-variable.txt:
--------------------------------------------------------------------------------
1 | Howdy <%= enemy %>
2 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/query/app/resolver.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-resolver';
2 |
--------------------------------------------------------------------------------
/tests/fixtures/smoke-tests/with-template-failing-linting/app/pod-template/template.hbs:
--------------------------------------------------------------------------------
1 | BADJUJU
2 |
--------------------------------------------------------------------------------
/tests/fixtures/smoke-tests/with-template-failing-linting/app/templates/blah.hbs:
--------------------------------------------------------------------------------
1 | Good file!
2 |
--------------------------------------------------------------------------------
/tests/fixtures/smoke-tests/with-template-failing-linting/app/templates/foo-bar.hbs:
--------------------------------------------------------------------------------
1 | BADJUJU
2 |
--------------------------------------------------------------------------------
/tests/fixtures/with-styles/app/styles/some-styles.css:
--------------------------------------------------------------------------------
1 | .some-weird-selector{cursor: crosshair;}
2 |
--------------------------------------------------------------------------------
/blueprints/app/files/public/robots.txt:
--------------------------------------------------------------------------------
1 | # http://www.robotstxt.org
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/node_modules/ember-generated-with-export-addon/addon/controllers/people.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/with-addon-pod-templates/addon/components/some-foo/template.hbs:
--------------------------------------------------------------------------------
1 | Hi!
2 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/with-addon-test-support/tests/dummy/app/templates/application.hbs:
--------------------------------------------------------------------------------
1 | Stuff Here!
2 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/with-app-styles/app/styles/foo-bar.css:
--------------------------------------------------------------------------------
1 | /* app/styles/foo-ba.css contents */
2 |
--------------------------------------------------------------------------------
/tests/fixtures/bower-directory-tests/invalid-bowerrc/.bowerrc:
--------------------------------------------------------------------------------
1 | ({
2 | "directory": "vendor"
3 | })
4 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/both-build-files/vendor/brocfile-script.js:
--------------------------------------------------------------------------------
1 | var usingBrocfile = true;
2 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/jshint-addon/lib/ember-random-thing/test-support/unit/routes/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/multiple-sass-files/app/styles/app.scss:
--------------------------------------------------------------------------------
1 | body { background: green; }
2 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/multiple-sass-files/app/styles/main.scss:
--------------------------------------------------------------------------------
1 | body { background: black; }
2 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/multiple-sass-files/app/styles/theme/a.scss:
--------------------------------------------------------------------------------
1 | .theme { color: red; }
2 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/styles-and-templates-stripped/app/styles/foo.js:
--------------------------------------------------------------------------------
1 | //app/styles/foo.js
2 |
--------------------------------------------------------------------------------
/tests/fixtures/file-info/interpolate.txt:
--------------------------------------------------------------------------------
1 | {{ name }} ${ name } <% name %> <%- name %> <%= name %>
2 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | /assets
2 | /blueprints/.jshintrc
3 | /dev
4 | /docs
5 | /tests/!(helpers)
6 | /tmp
7 | /*.*
8 |
--------------------------------------------------------------------------------
/blueprints/addon-import/files/__root__/__path__/__name__.js:
--------------------------------------------------------------------------------
1 | export { default } from '<%= modulePath %>';
2 |
--------------------------------------------------------------------------------
/blueprints/app/files/.bowerrc:
--------------------------------------------------------------------------------
1 | {
2 | "directory": "bower_components",
3 | "analytics": false
4 | }
5 |
--------------------------------------------------------------------------------
/blueprints/component-addon/files/__root__/__path__/__name__.js:
--------------------------------------------------------------------------------
1 | export { default } from '<%= modulePath %>';
--------------------------------------------------------------------------------
/tests/fixtures/bower-directory-tests/bowerrc-with-directory/.bowerrc:
--------------------------------------------------------------------------------
1 | {
2 | "directory": "vendor"
3 | }
4 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/styles-and-templates-stripped/app/templates/bar.js:
--------------------------------------------------------------------------------
1 | //app/templates/bar.js
2 |
--------------------------------------------------------------------------------
/tests/fixtures/installation-checker/valid-bower-installation/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": []
3 | }
4 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-registry-ordering/app/styles/app.scss:
--------------------------------------------------------------------------------
1 | /* empty intentionally */
2 |
--------------------------------------------------------------------------------
/blueprints/app/files/app/resolver.js:
--------------------------------------------------------------------------------
1 | import Resolver from 'ember-resolver';
2 |
3 | export default Resolver;
4 |
--------------------------------------------------------------------------------
/blueprints/app/files/app/templates/application.hbs:
--------------------------------------------------------------------------------
1 | Welcome to Ember
2 |
3 | {{outlet}}
4 |
--------------------------------------------------------------------------------
/blueprints/helper-addon/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | module.exports = require('../addon-import');
4 |
--------------------------------------------------------------------------------
/blueprints/route-addon/files/__root__/__path__/__name__.js:
--------------------------------------------------------------------------------
1 | export { default } from '<%= routeModulePath %>';
2 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/shared-package/base/node_modules/foo-bar/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "foo-bar"
3 | }
4 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/shared-package/node_modules/dev-foo-bar/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "dev-foo-bar"
3 | }
4 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/node_modules/ember-non-root-addon/index.js:
--------------------------------------------------------------------------------
1 | // needed for proper addon discovery
2 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/with-dummy-public/tests/dummy/public/robots.txt:
--------------------------------------------------------------------------------
1 | # tests/dummy/public/robots.txt is present
--------------------------------------------------------------------------------
/tests/fixtures/addon/with-linting-errors/addon/index.js:
--------------------------------------------------------------------------------
1 | export default function() {
2 | var unused;
3 | }
4 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/public-tree/node_modules/ember-random-addon/public/some-root-file.txt:
--------------------------------------------------------------------------------
1 | ROOT FILE
2 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/query/app/pods/application/template.hbs:
--------------------------------------------------------------------------------
1 | ZOMG, PODS WORKS!!
2 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/styles-and-templates-stripped/app/styles-manager.js:
--------------------------------------------------------------------------------
1 | //app/styles-manager.js
2 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/styles-and-templates-stripped/app/templates-stuff.js:
--------------------------------------------------------------------------------
1 | //app/templates-stuff.js
2 |
--------------------------------------------------------------------------------
/tests/fixtures/with-styles/app/styles/app.css:
--------------------------------------------------------------------------------
1 | @import "some-styles.css";
2 | @import "some-other-styles.css";
3 |
--------------------------------------------------------------------------------
/tests/fixtures/with-styles/app/styles/some-other-styles.css:
--------------------------------------------------------------------------------
1 | .some-even-weirder-selector{cursor: crosshair;}
2 |
--------------------------------------------------------------------------------
/blueprints/initializer-addon/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | module.exports = require('../addon-import');
4 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/pod-templates-only/addon/components/my-component/template.hbs:
--------------------------------------------------------------------------------
1 | MY-COMPONENT-TEMPLATE-CONTENT
2 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/shared-package/base/node_modules/blah-blah/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "blah-blah"
3 | }
4 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/shared-package/base/node_modules/invalid-package/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "foo-bar"
3 | }
4 |
--------------------------------------------------------------------------------
/tests/fixtures/blueprints/basic_2/index.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | description: 'Another basic blueprint'
3 | };
4 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/app-import-with-legacy-files/vendor/legacy-file.js:
--------------------------------------------------------------------------------
1 | console.log("legacy-file.js");
2 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/pods-templates/app/application/template.hbs:
--------------------------------------------------------------------------------
1 | ZOMG, PODS WORKS!!
2 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/pods-with-prefix-templates/app/resolver.js:
--------------------------------------------------------------------------------
1 | export { default } from 'ember-resolver';
2 |
--------------------------------------------------------------------------------
/tests/fixtures/installation-checker/valid-bower-empty-installation/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": []
3 | }
4 |
--------------------------------------------------------------------------------
/tests/fixtures/missing-before-addon/lib/sample-addon/index.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'sample-addon'
3 | };
4 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors/app/styles/app.scss:
--------------------------------------------------------------------------------
1 | /* app styles included */
2 |
--------------------------------------------------------------------------------
/lib/broccoli/app-boot.js:
--------------------------------------------------------------------------------
1 | /* jshint ignore:start */
2 |
3 | {{content-for 'app-boot'}}
4 |
5 | /* jshint ignore:end */
6 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/developing-addon/addon/templates/components/simple-component.hbs:
--------------------------------------------------------------------------------
1 | This is a simple component
2 |
--------------------------------------------------------------------------------
/tests/fixtures/markdown/foo.md:
--------------------------------------------------------------------------------
1 | tacos are delicious and I enjoy eating them
2 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors-2/app/styles/app.scss:
--------------------------------------------------------------------------------
1 | /* app styles included */
2 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors-3/app/styles/app.scss:
--------------------------------------------------------------------------------
1 | /* app styles included */
2 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-with-addon-without-preprocessors/app/styles/app.scss:
--------------------------------------------------------------------------------
1 | /* app styles included */
2 |
--------------------------------------------------------------------------------
/tests/fixtures/problem-binary.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iheanyi/ember-cli/master/tests/fixtures/problem-binary.png
--------------------------------------------------------------------------------
/blueprints/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | rules: {
3 | // JSHint "strict"
4 | 'strict': 0,
5 | },
6 | };
7 |
--------------------------------------------------------------------------------
/blueprints/blueprint/files/blueprints/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "predef": [
3 | "console"
4 | ],
5 | "strict": false
6 | }
7 |
--------------------------------------------------------------------------------
/blueprints/initializer-addon/files/__root__/__path__/__name__.js:
--------------------------------------------------------------------------------
1 | export { default, initialize } from '<%= modulePath %>';
2 |
--------------------------------------------------------------------------------
/blueprints/instance-initializer-addon/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | module.exports = require('../addon-import');
4 |
--------------------------------------------------------------------------------
/blueprints/mixin/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | module.exports = {
4 | description: 'Generates a mixin.'
5 | };
6 |
--------------------------------------------------------------------------------
/lib/broccoli/app-suffix.js:
--------------------------------------------------------------------------------
1 | /* jshint ignore:start */
2 |
3 | {{content-for 'app-suffix'}}
4 |
5 | /* jshint ignore:end */
6 |
--------------------------------------------------------------------------------
/blueprints/route-addon/files/__root__/__templatepath__/__templatename__.js:
--------------------------------------------------------------------------------
1 | export { default } from '<%= templateModulePath %>';
2 |
--------------------------------------------------------------------------------
/blueprints/service/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | module.exports = {
4 | description: 'Generates a service.'
5 | };
6 |
--------------------------------------------------------------------------------
/blueprints/template/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | module.exports = {
4 | description: 'Generates a template.'
5 | };
6 |
--------------------------------------------------------------------------------
/blueprints/util/files/__root__/utils/__name__.js:
--------------------------------------------------------------------------------
1 | export default function <%= camelizedModuleName %>() {
2 | return true;
3 | }
4 |
--------------------------------------------------------------------------------
/lib/broccoli/vendor-suffix.js:
--------------------------------------------------------------------------------
1 | /* jshint ignore:start */
2 |
3 | {{content-for 'vendor-suffix'}}
4 |
5 | /* jshint ignore:end */
6 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/node_modules/ember-devDeps-addon/index.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: "ember-devDeps-addon"
3 | }
4 |
--------------------------------------------------------------------------------
/tests/fixtures/blueprints/with-templating/index.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | description: 'A blueprint with templating'
3 | };
4 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/app-import-with-legacy-files/vendor/second-legacy-file.js:
--------------------------------------------------------------------------------
1 | console.log('second-legacy-file.js');
2 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/pods-with-prefix-templates/app/pods/application/template.hbs:
--------------------------------------------------------------------------------
1 | ZOMG, PODS WORKS!!
2 |
--------------------------------------------------------------------------------
/blueprints/controller/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | module.exports = {
4 | description: 'Generates a controller.'
5 | };
6 |
--------------------------------------------------------------------------------
/blueprints/helper-addon/files/__root__/__path__/__name__.js:
--------------------------------------------------------------------------------
1 | export { default, <%= camelizedModuleName %> } from '<%= modulePath %>';
2 |
--------------------------------------------------------------------------------
/blueprints/initializer/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | module.exports = {
4 | description: 'Generates an initializer.'
5 | };
6 |
--------------------------------------------------------------------------------
/blueprints/instance-initializer-addon/files/__root__/__path__/__name__.js:
--------------------------------------------------------------------------------
1 | export { default, initialize } from '<%= modulePath %>';
2 |
--------------------------------------------------------------------------------
/blueprints/mixin/files/__root__/mixins/__name__.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default Ember.Mixin.create({
4 | });
5 |
--------------------------------------------------------------------------------
/blueprints/route/files/__root__/__path__/__name__.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default Ember.Route.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/blueprints/test-helper/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | module.exports = {
4 | description: 'Generates a test helper.'
5 | };
6 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/app-import-output-file/vendor/custom-output-file.js:
--------------------------------------------------------------------------------
1 | console.log("hello from js custom output file");
2 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/app-import-with-legacy-files/vendor/legacy-file.css:
--------------------------------------------------------------------------------
1 | body:after {
2 | content: 'legacy-file.css';
3 | }
4 |
--------------------------------------------------------------------------------
/blueprints/adapter/files/__root__/__path__/__name__.js:
--------------------------------------------------------------------------------
1 | <%= importStatement %>
2 |
3 | export default <%= baseClass %>.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/blueprints/service/files/__root__/__path__/__name__.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default Ember.Service.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/app-import/node_modules/ember-bad-addon/vendor/ember-bad-addon/file-to-import.js:
--------------------------------------------------------------------------------
1 | //example javascript to import
--------------------------------------------------------------------------------
/assets/architecture/Ember-CLI architecture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iheanyi/ember-cli/master/assets/architecture/Ember-CLI architecture.png
--------------------------------------------------------------------------------
/blueprints/blueprint/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | module.exports = {
4 | description: 'Generates a blueprint and definition.'
5 | };
6 |
--------------------------------------------------------------------------------
/blueprints/controller/files/__root__/__path__/__name__.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default Ember.Controller.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/blueprints/serializer/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | module.exports = {
4 | description: 'Generates an ember-data serializer.'
5 | };
6 |
--------------------------------------------------------------------------------
/lib/broccoli/test-support-prefix.js:
--------------------------------------------------------------------------------
1 | /* jshint ignore:start */
2 |
3 | {{content-for 'test-support-prefix'}}
4 |
5 | /* jshint ignore:end */
6 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/component-with-template/addon/index.js:
--------------------------------------------------------------------------------
1 | import BasicThing from "./components/basic-thing";
2 | export default BasicThing;
3 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/component-with-template/addon/templates/components/basic-thing.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{yield}}
3 |
4 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/developing-addon/app/components/simple-component.js:
--------------------------------------------------------------------------------
1 | export { default } from 'developing-addon/components/simple-component';
2 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/lib/ember-super-button/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | name: 'Ember Super Button',
5 | };
6 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/lib/ember-super-button/lib/ember-ng/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | name: 'Ember Ng'
5 | };
6 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/app-import/node_modules/ember-random-addon/vendor/ember-random-addon/file-to-import.txt:
--------------------------------------------------------------------------------
1 | EXAMPLE TEXT FILE CONTENT
2 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors/node_modules/ember-cool-addon/addon/styles/addon.scss:
--------------------------------------------------------------------------------
1 | /* addon styles included */
--------------------------------------------------------------------------------
/blueprints/addon/files/index.js:
--------------------------------------------------------------------------------
1 | /* jshint node: true */
2 | 'use strict';
3 |
4 | module.exports = {
5 | name: '<%= addonModulePrefix %>'
6 | };
7 |
--------------------------------------------------------------------------------
/blueprints/serializer/files/__root__/__path__/__name__.js:
--------------------------------------------------------------------------------
1 | import DS from 'ember-data';
2 |
3 | export default DS.RESTSerializer.extend({
4 | });
5 |
--------------------------------------------------------------------------------
/blueprints/transform/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | module.exports = {
4 | description: 'Generates an ember-data value transform.'
5 | };
6 |
--------------------------------------------------------------------------------
/blueprints/util/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | module.exports = {
4 | description: 'Generates a simple utility module/function.'
5 | };
6 |
--------------------------------------------------------------------------------
/lib/broccoli/app-prefix.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | /* jshint ignore:start */
4 |
5 | {{content-for 'app-prefix'}}
6 |
7 | /* jshint ignore:end */
8 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/pod-templates-only/app/components/my-component.js:
--------------------------------------------------------------------------------
1 | import { default } from 'some-cool-addon/components/my-component/component';
2 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/node_modules/ember-addon-with-dependencies/index.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'Ember Addon With Dependencies'
3 | }
4 |
--------------------------------------------------------------------------------
/.codeclimate.yml:
--------------------------------------------------------------------------------
1 | languages:
2 | JavaScript: true
3 |
4 | exclude_paths:
5 | - "tests/acceptance/*"
6 | - "tests/fixtures/*"
7 | - "tests/unit/*"
8 |
--------------------------------------------------------------------------------
/blueprints/instance-initializer/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | module.exports = {
4 | description: 'Generates an instance initializer.'
5 | };
6 |
--------------------------------------------------------------------------------
/blueprints/model/files/__root__/__path__/__name__.js:
--------------------------------------------------------------------------------
1 | import DS from 'ember-data';
2 |
3 | export default DS.Model.extend({
4 | <%= attrs %>
5 | });
6 |
--------------------------------------------------------------------------------
/dev/generate-docs.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | var DocGenerator = require('../lib/utilities/doc-generator.js');
4 | (new DocGenerator()).generate();
5 |
--------------------------------------------------------------------------------
/lib/tasks/server/middleware/proxy-server/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "proxy-server-middleware",
3 | "keywords": [
4 | "ember-addon"
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/env-addons/node_modules/ember-random-addon/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | name: 'Ember Random Addon'
5 | };
6 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/node_modules/ember-generated-with-export-addon/index.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'Ember CLI Generated with export'
3 | }
4 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/node_modules/ember-random-addon/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | name: 'Ember Random Addon'
5 | };
6 |
--------------------------------------------------------------------------------
/tests/fixtures/app/without-ember-debug/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "cool-app",
3 | "devDependencies": {
4 | "loader.js": "latest"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/app-import-output-file/vendor/custom-output-file.css:
--------------------------------------------------------------------------------
1 | body:after {
2 | content: "hello from css custom output file"
3 | }
4 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-with-addon-without-preprocessors/node_modules/ember-cool-addon/addon/styles/addon.css:
--------------------------------------------------------------------------------
1 | /* addon styles included */
2 |
--------------------------------------------------------------------------------
/blueprints/in-repo-addon/files/lib/__name__/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "<%= dasherizedModuleName %>",
3 | "keywords": [
4 | "ember-addon"
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/lib/ember-super-button/node_modules/ember-yagni/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | name: 'Ember Yagni'
5 | };
6 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/node_modules/ember-after-blueprint-addon/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | name: 'Ember After Addon'
5 | };
6 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/with-config/config/environment.js:
--------------------------------------------------------------------------------
1 | module.exports = function(env, base) {
2 | base.addon = 'with-config';
3 |
4 | return base;
5 | };
6 |
--------------------------------------------------------------------------------
/tests/fixtures/app/with-default-ember-debug/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "cool-app",
3 | "devDependencies": {
4 | "loader.js": "latest"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/jshint-addon/lib/ember-random-thing/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | name: 'ember-random-thing'
5 | }
6 |
--------------------------------------------------------------------------------
/tests/fixtures/restart-express-server/copy1/subfolder/a.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = function () {
4 | return 'Copy1 contents of A.';
5 | };
6 |
--------------------------------------------------------------------------------
/tests/fixtures/restart-express-server/copy1/subfolder/b.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = function () {
4 | return 'Copy1 contents of B.';
5 | };
6 |
--------------------------------------------------------------------------------
/tests/fixtures/restart-express-server/copy1/subfolder/c.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = function () {
4 | return 'Copy1 contents of C.';
5 | };
6 |
--------------------------------------------------------------------------------
/tests/fixtures/restart-express-server/copy2/subfolder/a.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = function () {
4 | return 'Copy2 contents of A.';
5 | };
6 |
--------------------------------------------------------------------------------
/tests/fixtures/restart-express-server/copy2/subfolder/b.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = function () {
4 | return 'Copy2 contents of B.';
5 | };
6 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/lib/ember-super-button/lib/ember-ng/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ember-ng",
3 | "keywords": [
4 | "ember-addon"
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/node_modules/ember-before-blueprint-addon/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | name: 'Ember Before Addon'
5 | };
6 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/node_modules/ember-non-root-addon/ember-index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | name: 'Ember Non Root Addon'
5 | };
6 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/node_modules/something-else/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "something-else",
3 | "version": "0.0.0",
4 | "private": true
5 | }
6 |
7 |
--------------------------------------------------------------------------------
/tests/fixtures/blueprints/exporting-object/index.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | description: 'A blueprint that exports an object',
3 | woot: 'someValueHere'
4 | };
5 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/public-tree/node_modules/ember-random-addon/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | name: 'ember-random-addon'
5 | };
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 | npm-debug.log
3 | /tmp
4 | /common-tmp
5 | *.tgz
6 | /docs/build
7 | .node_modules-tmp
8 | .bower_components-tmp
9 | /coverage
10 |
--------------------------------------------------------------------------------
/tests/fixtures/restart-express-server/app-root/server/subfolder/a.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = function () {
4 | return 'Initial contents of A.';
5 | };
6 |
--------------------------------------------------------------------------------
/tests/fixtures/restart-express-server/app-root/server/subfolder/b.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = function () {
4 | return 'Initial contents of a';
5 | };
6 |
--------------------------------------------------------------------------------
/blueprints/app/files/tests/test-helper.js:
--------------------------------------------------------------------------------
1 | import resolver from './helpers/resolver';
2 | import {
3 | setResolver
4 | } from 'ember-qunit';
5 |
6 | setResolver(resolver);
7 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/component-with-template/app/components/basic-thing.js:
--------------------------------------------------------------------------------
1 | import BasicThing from 'some-cool-addon/components/basic-thing';
2 | export default BasicThing;
3 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/component-with-template/tests/dummy/app/templates/application.hbs:
--------------------------------------------------------------------------------
1 | {{#basic-thing}}WOOT!!{{/basic-thing}}
2 | {{#second-thing}}SECOND!!{{/second-thing}}
3 |
--------------------------------------------------------------------------------
/tests/helpers/convert-help-output-to-json.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = function(output) {
4 | return JSON.parse(output.substr(output.indexOf('{')));
5 | };
6 |
--------------------------------------------------------------------------------
/blueprints/component/files/__root__/__path__/__name__.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | <%= importTemplate %>
3 | export default Ember.Component.extend({<%= contents %>
4 | });
5 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/lib/ember-super-button/node_modules/ember-yagni/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ember-yagni",
3 | "keywords": [
4 | "ember-addon"
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/multiple-sass-files/node_modules/broccoli-sass/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "broccoli-sass",
3 | "private": true,
4 | "version": "1.0.0"
5 | }
6 |
--------------------------------------------------------------------------------
/blueprints/addon/files/addon-config/environment.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 | 'use strict';
3 |
4 | module.exports = function(/* environment, appConfig */) {
5 | return { };
6 | };
7 |
--------------------------------------------------------------------------------
/blueprints/app/files/tests/helpers/destroy-app.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default function destroyApp(application) {
4 | Ember.run(application, 'destroy');
5 | }
6 |
--------------------------------------------------------------------------------
/lib/broccoli/tests-suffix.js:
--------------------------------------------------------------------------------
1 | /* jshint ignore:start */
2 |
3 | require('{{MODULE_PREFIX}}/tests/test-helper');
4 | EmberENV.TESTS_FILE_LOADED = true;
5 |
6 | /* jshint ignore:end */
7 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/node_modules/non-ember-thingy/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "non-ember-thingy",
3 | "private": true,
4 | "version": "0.0.0",
5 | "keywords": [ ]
6 | }
7 |
--------------------------------------------------------------------------------
/tests/fixtures/missing-before-addon/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "sample",
3 | "ember-addon": {
4 | "paths": [
5 | "lib/sample-addon"
6 | ]
7 | }
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/no-ember-cli-build/Brocfile.js:
--------------------------------------------------------------------------------
1 | var EmberApp = require('ember-cli/lib/broccoli/ember-app');
2 | var app = new EmberApp();
3 |
4 | module.exports = app.toTree();
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors-2/node_modules/ember-cool-addon/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | name: 'ember-cool-addon'
5 | };
6 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors/node_modules/ember-cool-addon/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | name: 'ember-cool-addon'
5 | };
6 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-with-addon-without-preprocessors/node_modules/ember-cool-addon/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | name: 'ember-cool-addon'
5 | };
6 |
--------------------------------------------------------------------------------
/tests/fixtures/smoke-tests/no-testem-launchers/testem.json:
--------------------------------------------------------------------------------
1 | {
2 | "framework": "qunit",
3 | "test_page": "tests/index.html",
4 | "launch_in_ci": [ ],
5 | "launch_in_dev": [ ]
6 | }
7 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors-3/node_modules/ember-shallow-addon/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | name: 'ember-shallow-addon'
5 | };
6 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors/node_modules/broccoli-sass/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "broccoli-sass",
3 | "private": true,
4 | "version": "1.0.0"
5 | }
6 |
--------------------------------------------------------------------------------
/blueprints/test-helper/files/tests/helpers/__name__.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default Ember.Test.registerAsyncHelper('<%= camelizedModuleName %>', function(app) {
4 |
5 | });
6 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/content-for-head/index.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'content-for-head',
3 |
4 | contentFor: function(type, config) {
5 | return '"SOME AWESOME STUFF"';
6 | }
7 | };
8 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/env-addons/node_modules/ember-random-addon/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ember-random-addon",
3 | "private": true,
4 | "keywords": [
5 | "ember-addon"
6 | ]
7 | }
8 |
9 |
--------------------------------------------------------------------------------
/tests/fixtures/blueprints/basic/files/.ember-cli:
--------------------------------------------------------------------------------
1 | {
2 | "port": 4200,
3 | "host": "0.0.0.0",
4 | "live-reload": true,
5 | "environment": "development",
6 | "checkForUpdates": false
7 | }
8 |
--------------------------------------------------------------------------------
/tests/fixtures/blueprints/basic_2/files/.ember-cli:
--------------------------------------------------------------------------------
1 | {
2 | "port": 4200,
3 | "host": "0.0.0.0",
4 | "live-reload": true,
5 | "environment": "development",
6 | "checkForUpdates": false
7 | }
8 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/jshint-addon/lib/ember-random-thing/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ember-random-thing",
3 | "version": "0.0.0",
4 | "keywords": [
5 | "ember-addon"
6 | ]
7 | }
8 |
--------------------------------------------------------------------------------
/lib/broccoli/vendor-prefix.js:
--------------------------------------------------------------------------------
1 | /* jshint ignore:start */
2 |
3 | window.EmberENV = {{EMBER_ENV}};
4 | var runningTests = false;
5 |
6 | {{content-for 'vendor-prefix'}}
7 |
8 | /* jshint ignore:end */
9 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/developing-addon/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 | module.exports = {
3 | name: 'developing-addon',
4 |
5 | isDevelopingAddon: function() {
6 | return true;
7 | }
8 | };
9 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/env-addons/node_modules/ember-foo-env-addon/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ember-foo-env-addon",
3 | "private": true,
4 | "keywords": [
5 | "ember-addon"
6 | ]
7 | }
8 |
9 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/with-blueprint-override/blueprints/component/index.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | locals: function(options) {
3 | return this.lookupBlueprint('component').locals(options);
4 | }
5 | };
6 |
--------------------------------------------------------------------------------
/tests/fixtures/smoke-tests/test-with-syntax-error/tests/unit/some-test.js:
--------------------------------------------------------------------------------
1 | /*jshint strict:false */
2 | /* globals QUnit */
3 |
4 | QUnit.test('syntax error', function(assert) {
5 | # syntax error
6 | });
7 |
--------------------------------------------------------------------------------
/blueprints/lib/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | module.exports = {
4 | description: 'Generates a lib directory for in-repo addons.',
5 |
6 | normalizeEntityName: function(name) { return name; }
7 | };
8 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/component-with-template/tests/dummy/app/components/second-thing.js:
--------------------------------------------------------------------------------
1 | import BasicThing from "some-cool-addon";
2 | export default BasicThing.extend({
3 | classNames: ['second-thing']
4 | });
5 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/env-addons/node_modules/ember-foo-env-addon/index.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'ember-foo-env-addon',
3 | isEnabled: function() {
4 | return this.app.env === 'foo';
5 | }
6 | };
7 |
--------------------------------------------------------------------------------
/blueprints/in-repo-addon/files/lib/__name__/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 | module.exports = {
3 | name: '<%= dasherizedModuleName %>',
4 |
5 | isDevelopingAddon: function() {
6 | return true;
7 | }
8 | };
9 |
--------------------------------------------------------------------------------
/lib/broccoli/app-config.js:
--------------------------------------------------------------------------------
1 | /* jshint ignore:start */
2 |
3 | define('{{MODULE_PREFIX}}/config/environment', ['ember'], function(Ember) {
4 | {{content-for 'config-module'}}
5 | });
6 |
7 | /* jshint ignore:end */
8 |
--------------------------------------------------------------------------------
/tests/fixtures/smoke-tests/passing-test/tests/unit/some-test.js:
--------------------------------------------------------------------------------
1 | /*jshint strict:false */
2 | /* globals QUnit */
3 |
4 | QUnit.test('passing test', function(assert) {
5 | assert.ok(true, 'test should pass');
6 | });
7 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors-3/node_modules/ember-shallow-addon/node_modules/ember-deep-addon/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | name: 'ember-deep-addon'
5 | };
6 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/pod-templates-only/addon/components/my-component/component.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import template from './template';
3 |
4 | export default Ember.Component.extend({
5 | layout: template
6 | });
7 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/app-test-import/node_modules/ember-test-addon/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ember-test-addon",
3 | "private": true,
4 | "version": "0.0.0",
5 | "keywords": [
6 | "ember-addon"
7 | ]
8 | }
9 |
--------------------------------------------------------------------------------
/tests/fixtures/home/.ember-cli:
--------------------------------------------------------------------------------
1 | {
2 | "port": 999,
3 | "proxy": "http://iamstef.net/ember-cli",
4 | "host": "0.1.0.1",
5 | "liveReload": true,
6 | "environment": "mock-development",
7 | "checkForUpdates": true
8 | }
9 |
--------------------------------------------------------------------------------
/tests/fixtures/smoke-tests/with-template-failing-linting/node_modules/fake-template-linter/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fake-template-linter",
3 | "version": "1.0.0",
4 | "keywords": [
5 | "ember-addon"
6 | ]
7 | }
8 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/node_modules/ember-random-addon/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ember-random-addon",
3 | "private": true,
4 | "version": "0.0.0",
5 | "keywords": [
6 | "ember-addon"
7 | ]
8 | }
9 |
10 |
--------------------------------------------------------------------------------
/tests/fixtures/restart-express-server/app-root/server/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var fs = require('fs');
4 | var a = require('./subfolder/a');
5 |
6 | module.exports = function () {
7 | fs.writeFileSync('foo.txt', a());
8 | };
9 |
--------------------------------------------------------------------------------
/lib/tasks/server/middleware/serve-files/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "serve-files-middleware",
3 | "keywords": [
4 | "ember-addon"
5 | ],
6 | "ember-addon": {
7 | "before": "proxy-server-middleware"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/developing-addon/addon/components/simple-component.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import layout from '../templates/components/simple-component';
3 |
4 | export default Ember.Component.extend({
5 | layout
6 | });
7 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/app-import/node_modules/ember-bad-addon/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ember-bad-addon",
3 | "private": true,
4 | "version": "0.0.0",
5 | "keywords": [
6 | "ember-addon"
7 | ]
8 | }
9 |
10 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/both-build-files/Brocfile.js:
--------------------------------------------------------------------------------
1 | var EmberApp = require('ember-cli/lib/broccoli/ember-app');
2 | var app = new EmberApp();
3 |
4 | app.import('vendor/brocfile-script.js');
5 |
6 | module.exports = app.toTree();
7 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/custom-ember-env/config/environment.js:
--------------------------------------------------------------------------------
1 | module.exports = function() {
2 | return {
3 | modulePrefix: 'some-cool-app',
4 | EmberENV: {
5 | asdflkmawejf: ';jlnu3yr23'
6 | }
7 | };
8 | };
9 |
--------------------------------------------------------------------------------
/lib/tasks/server/middleware/history-support/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "history-support-middleware",
3 | "keywords": [
4 | "ember-addon"
5 | ],
6 | "ember-addon": {
7 | "before": "serve-files-middleware"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/lib/tasks/server/middleware/tests-server/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "tests-server-middleware",
3 | "keywords": [
4 | "ember-addon"
5 | ],
6 | "ember-addon": {
7 | "before": "history-support-middleware"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/app-import/node_modules/ember-random-addon/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ember-random-addon",
3 | "private": true,
4 | "version": "0.0.0",
5 | "keywords": [
6 | "ember-addon"
7 | ]
8 | }
9 |
10 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/public-tree/node_modules/ember-random-addon/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ember-random-addon",
3 | "private": true,
4 | "version": "0.0.0",
5 | "keywords": [
6 | "ember-addon"
7 | ]
8 | }
9 |
10 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/component-with-template/addon/components/basic-thing.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import template from '../templates/components/basic-thing';
3 |
4 | export default Ember.Component.extend({
5 | layout: template
6 | });
7 |
--------------------------------------------------------------------------------
/blueprints/helper/files/__root__/helpers/__name__.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export function <%= camelizedModuleName %>(params/*, hash*/) {
4 | return params;
5 | }
6 |
7 | export default Ember.Helper.helper(<%= camelizedModuleName %>);
8 |
--------------------------------------------------------------------------------
/lib/tasks/destroy-from-blueprint.js:
--------------------------------------------------------------------------------
1 | /*jshint quotmark: false*/
2 |
3 | 'use strict';
4 |
5 | var Generate = require('./generate-from-blueprint');
6 |
7 | module.exports = Generate.extend({
8 | blueprintFunction: 'uninstall'
9 | });
10 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/developing-addon/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "developing-addon",
3 | "version": "0.0.1",
4 | "keywords": [
5 | "ember-addon"
6 | ],
7 | "dependencies": {
8 | "ember-cli-htmlbars": "latest"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/query/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "query",
3 | "dependencies": {
4 | "ember-cli": "*",
5 | "ember-cli-htmlbars": "0.7.9",
6 | "ember-resolver": "^2.0.2",
7 | "loader.js": "latest"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/tests/fixtures/smoke-tests/failing-test/tests/unit/some-test.js:
--------------------------------------------------------------------------------
1 | /*jshint strict:false */
2 | /* globals QUnit */
3 |
4 | QUnit.test('failing test', function(assert) {
5 | assert.ok(false, 'test should fail to confirm ember test exit code');
6 | });
7 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | tmp/*
2 | node_modules/*
3 | coverage/*
4 | blueprints/**/files/**/*.js
5 | tests/fixtures/*
6 | common-tmp/*
7 |
8 | lib/broccoli/app-*.js
9 | lib/broccoli/test-support-*.js
10 | lib/broccoli/tests-*.js
11 | lib/broccoli/vendor-*.js
12 |
--------------------------------------------------------------------------------
/blueprints/vendor-shim/files/vendor/shims/__name__.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | function vendorModule() {
3 | 'use strict';
4 |
5 | return { 'default': self['<%= name %>'] };
6 | }
7 |
8 | define('<%= name %>', [], vendorModule);
9 | })();
10 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/env-addons/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "env-addons",
3 | "private": true,
4 | "devDependencies": {
5 | "ember-foo-env-addon": "latest",
6 | "ember-random-addon": "latest",
7 | "loader.js": "latest"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/node_modules/ember-devDeps-addon/node_modules/ember-cli-nested/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ember-cli-nested",
3 | "private": true,
4 | "version": "0.0.0",
5 | "keywords": [
6 | "ember-addon"
7 | ]
8 | }
9 |
10 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/with-blueprint-override/blueprints/component/files/__root__/__path__/__name__.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | <%= importTemplate %>
3 | export default Ember.Component.extend({<%= contents %>
4 | });
5 | //generated component successfully
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-registry-ordering/app/components/should-be-preprocessed.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default Ember.Component.extend({
4 | foo: /__SECOND_PREPROCESSOR_REPLACEMENT_TOKEN__/ //jshint ignore:line
5 | });
6 |
--------------------------------------------------------------------------------
/tests/fixtures/tasks/testem-config/testem.json:
--------------------------------------------------------------------------------
1 | {
2 | "framework": "qunit",
3 | "test_page": "tests/index.html",
4 | "launch_in_ci": [
5 | "PhantomJS"
6 | ],
7 | "launch_in_dev": [
8 | "PhantomJS",
9 | "Chrome"
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/tests/helpers/kill-cli-process.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = function(childProcess) {
4 | if (process.platform === 'win32') {
5 | childProcess.send({kill: true});
6 | } else {
7 | childProcess.kill('SIGINT');
8 | }
9 | };
10 |
--------------------------------------------------------------------------------
/assets/architecture/README.md:
--------------------------------------------------------------------------------
1 | # Steps to update architecture diagram
2 | 1. Open xml file in https://www.draw.io
3 | 2. Make necessary changes
4 | 3. Commit the updated diagram in xml and png format.
5 | 4. Point the ARCHITECTURE.md file to the updated diagram
6 |
--------------------------------------------------------------------------------
/blueprints/app/files/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "<%= name %>",
3 | "dependencies": {
4 | "ember": "~2.4.1",
5 | "ember-cli-shims": "0.1.0",
6 | "ember-cli-test-loader": "0.2.2",
7 | "ember-qunit-notifications": "0.1.0"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/lib/broccoli/test-support-suffix.js:
--------------------------------------------------------------------------------
1 | /* jshint ignore:start */
2 |
3 | runningTests = true;
4 |
5 | if (window.Testem) {
6 | window.Testem.hookIntoTestFramework();
7 | }
8 |
9 | {{content-for 'test-support-suffix'}}
10 |
11 | /* jshint ignore:end */
12 |
--------------------------------------------------------------------------------
/lib/utilities/normalize-blueprint-option.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var path = require('path');
4 |
5 | module.exports = function normalizeBlueprintOption(blueprint) {
6 | return blueprint[0] === '.' ? path.resolve(process.cwd(), blueprint) : blueprint;
7 | };
8 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/node_modules/ember-generated-with-export-addon/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ember-generated-with-export-addon",
3 | "private": true,
4 | "version": "0.0.0",
5 | "keywords": [
6 | "ember-addon"
7 | ]
8 | }
9 |
10 |
--------------------------------------------------------------------------------
/tests/fixtures/missing-before-addon/lib/sample-addon/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "sample-addon",
3 | "keywords": [
4 | "ember-addon"
5 | ],
6 | "ember-addon": {
7 | "after": "broccoli-asset-rev"
8 | },
9 | "dependencies": {}
10 | }
11 |
--------------------------------------------------------------------------------
/blueprints/initializer/files/__root__/initializers/__name__.js:
--------------------------------------------------------------------------------
1 | export function initialize(/* application */) {
2 | // application.inject('route', 'foo', 'service:foo');
3 | }
4 |
5 | export default {
6 | name: '<%= dasherizedModuleName %>',
7 | initialize
8 | };
9 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors-2/app/components/should-not-be-preprocessed.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default Ember.Component.extend({
4 | foo: __PREPROCESSOR_REPLACEMENT_TOKEN__ //jshint ignore:line
5 | });
6 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors-2/node_modules/ember-cool-addon/addon/components/clitest-example.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default Ember.Component.extend({
4 | foo: __PREPROCESSOR_REPLACEMENT_TOKEN__
5 | });
6 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors-3/app/components/should-not-be-preprocessed.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default Ember.Component.extend({
4 | foo: __PREPROCESSOR_REPLACEMENT_TOKEN__ //jshint ignore:line
5 | });
6 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-with-addon-without-preprocessors/node_modules/ember-cool-addon/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ember-cool-addon",
3 | "private": true,
4 | "version": "0.0.0",
5 | "keywords": [
6 | "ember-addon"
7 | ]
8 | }
9 |
10 |
--------------------------------------------------------------------------------
/dev/prepare-release:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | git clean -fdx && \
4 | npm cache clear && \
5 | npm i --no-optional && \
6 | npm link --no-optional && \
7 | npm pack && \
8 | du -sh ./ember-cli-*.tgz && \
9 | npm uninstall -g ember-cli && \
10 | npm i -g ./ember-cli-*.tgz
11 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/custom-environment-config/config/environment.js:
--------------------------------------------------------------------------------
1 | module.exports = function() {
2 | return {
3 | modulePrefix: 'some-cool-app',
4 | fileUsed: 'config/environment.js',
5 | baseURL: '/',
6 | locationType: 'auto'
7 | };
8 | };
9 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/custom-environment-config/config/something-else.js:
--------------------------------------------------------------------------------
1 | module.exports = function() {
2 | return {
3 | modulePrefix: 'some-cool-app',
4 | fileUsed: 'config/something-else.js',
5 | baseURL: '/',
6 | locationType: 'auto'
7 | };
8 | };
9 |
--------------------------------------------------------------------------------
/blueprints/app/files/app/router.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import config from './config/environment';
3 |
4 | const Router = Ember.Router.extend({
5 | location: config.locationType
6 | });
7 |
8 | Router.map(function() {
9 | });
10 |
11 | export default Router;
12 |
--------------------------------------------------------------------------------
/lib/utilities/require-local.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var path = require('path');
4 | var nodeModulesPath = require('node-modules-path');
5 |
6 | module.exports = function requireLocal(lib) {
7 | return require(path.join(nodeModulesPath(process.cwd()), lib));
8 | };
9 |
--------------------------------------------------------------------------------
/tests/fixtures/restart-express-server/copy2/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var fs = require('fs');
4 | var a = require('./subfolder/a');
5 | var b = require('./subfolder/b');
6 |
7 | module.exports = function () {
8 | fs.writeFileSync('foo.txt', a() + ' ' + b());
9 | };
10 |
--------------------------------------------------------------------------------
/blueprints/instance-initializer/files/__root__/instance-initializers/__name__.js:
--------------------------------------------------------------------------------
1 | export function initialize(/* appInstance */) {
2 | // appInstance.inject('route', 'foo', 'service:foo');
3 | }
4 |
5 | export default {
6 | name: '<%= dasherizedModuleName %>',
7 | initialize
8 | };
9 |
--------------------------------------------------------------------------------
/tests/fixtures/tasks/testem-config/testem-with-query-string.json:
--------------------------------------------------------------------------------
1 | {
2 | "framework": "qunit",
3 | "test_page": "tests/index.html?hidepassed",
4 | "launch_in_ci": [
5 | "PhantomJS"
6 | ],
7 | "launch_in_dev": [
8 | "PhantomJS",
9 | "Chrome"
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/blueprints/transform/files/__root__/__path__/__name__.js:
--------------------------------------------------------------------------------
1 | import DS from 'ember-data';
2 |
3 | export default DS.Transform.extend({
4 | deserialize(serialized) {
5 | return serialized;
6 | },
7 |
8 | serialize(deserialized) {
9 | return deserialized;
10 | }
11 | });
12 |
--------------------------------------------------------------------------------
/lib/utilities/get-package-base-name.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = function (name) {
4 | var packageParts;
5 |
6 | if (!name) {
7 | return null;
8 | }
9 |
10 | packageParts = name.split('/');
11 | return packageParts[(packageParts.length - 1)];
12 | };
13 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/with-addon-test-support/addon-test-support/current-text.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | const { $ } = Ember;
4 |
5 | export default function(application) {
6 | let rootElement = application.rootElement;
7 |
8 | return $(rootElement).text();
9 | }
10 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/lib/ember-super-button/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ember-super-button",
3 | "keywords": [
4 | "ember-addon"
5 | ],
6 | "ember-addon": {
7 | "paths": ["./lib/ember-ng"]
8 | },
9 | "dependencies": {
10 | "ember-yagni": "0"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/tests/helpers/process-help-string.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var chalk = require('chalk');
4 |
5 | module.exports = function(helpString) {
6 | // currently windows
7 | if (chalk.supportsColor) {
8 | return helpString;
9 | }
10 | return chalk.stripColor(helpString);
11 | };
12 |
--------------------------------------------------------------------------------
/blueprints/addon/files/npmignore:
--------------------------------------------------------------------------------
1 | /bower_components
2 | /config/ember-try.js
3 | /dist
4 | /tests
5 | /tmp
6 | **/.gitkeep
7 | .bowerrc
8 | .editorconfig
9 | .ember-cli
10 | .gitignore
11 | .jshintrc
12 | .watchmanconfig
13 | .travis.yml
14 | bower.json
15 | ember-cli-build.js
16 | testem.js
17 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/node_modules/ember-devDeps-addon/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ember-devDeps-addon",
3 | "private": true,
4 | "version": "0.0.0",
5 | "keywords": [
6 | "ember-addon"
7 | ],
8 | "devDependencies": {
9 | "ember-cli-nested": "*"
10 | }
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors-3/node_modules/ember-shallow-addon/node_modules/ember-deep-addon/addon/components/clitest-deep-example.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default Ember.Component.extend({
4 | deep: __PREPROCESSOR_REPLACEMENT_TOKEN__
5 | });
6 |
--------------------------------------------------------------------------------
/dev/linux/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:latest
2 |
3 | RUN npm i -g npm
4 | RUN npm i -g phantomjs-prebuilt
5 |
6 | RUN apt-get update && apt-get install -y git
7 |
8 | RUN git clone https://github.com/ember-cli/ember-cli.git ~/ember-cli
9 | RUN cd ~/ember-cli && npm i
10 |
11 | ENTRYPOINT ["/bin/bash"]
12 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/both-build-files/ember-cli-build.js:
--------------------------------------------------------------------------------
1 | /* global require, module */
2 | var EmberApp = require('ember-cli/lib/broccoli/ember-addon');
3 |
4 | module.exports = function(defaults) {
5 | var app = new EmberApp(defaults, {
6 |
7 | });
8 |
9 | return app.toTree();
10 | };
11 |
--------------------------------------------------------------------------------
/tests/fixtures/help/foo.txt:
--------------------------------------------------------------------------------
1 | Requested ember-cli commands:
2 |
3 | ember foo \u001b[33m\u001b[39m \u001b[36m\u001b[39m
4 | Initializes the warp drive.
5 | \u001b[36m--dry-run\u001b[39m \u001b[36m(Boolean)\u001b[39m \u001b[36m(Default: false)\u001b[39m
6 | \u001b[90maliases: -d\u001b[39m
7 |
8 |
--------------------------------------------------------------------------------
/tests/fixtures/project-with-handlebars/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "test-project",
3 | "private": true,
4 | "dependencies": {
5 | },
6 | "ember-addon": {
7 | },
8 | "devDependencies": {
9 | "ember-cli": "latest",
10 | "ember-resolver": "^2.0.2",
11 | "loader.js": "*"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/node_modules/ember-after-blueprint-addon/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ember-after-blueprint-addon",
3 | "private": true,
4 | "version": "0.0.0",
5 | "keywords": [
6 | "ember-addon"
7 | ],
8 | "ember-addon": {
9 | "after": "ember-random-addon"
10 | }
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/node_modules/ember-before-blueprint-addon/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ember-before-blueprint-addon",
3 | "private": true,
4 | "version": "0.0.0",
5 | "keywords": [
6 | "ember-addon"
7 | ],
8 | "ember-addon": {
9 | "before": "ember-random-addon"
10 | }
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/blueprints/app/files/testem.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 | module.exports = {
3 | "framework": "qunit",
4 | "test_page": "tests/index.html?hidepassed",
5 | "disable_watching": true,
6 | "launch_in_ci": [
7 | "PhantomJS"
8 | ],
9 | "launch_in_dev": [
10 | "PhantomJS",
11 | "Chrome"
12 | ]
13 | };
14 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/custom-environment-config/tests/unit/config-test.js:
--------------------------------------------------------------------------------
1 | /*jshint strict:false */
2 | /* globals QUnit */
3 |
4 | import config from '../../config/environment';
5 |
6 | QUnit.test('the correct config is used', function(assert) {
7 | assert.equal(config.fileUsed, 'config/something-else.js');
8 | });
9 |
--------------------------------------------------------------------------------
/tests/unit/lint-test.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var glob = require('glob').sync;
4 |
5 | var paths = glob('tests/*').filter(function(path) {
6 | return !/fixtures/.test(path);
7 | });
8 |
9 | paths = paths.concat([
10 | 'lib',
11 | 'bin',
12 | 'blueprints'
13 | ]);
14 |
15 | require('mocha-eslint')(paths);
16 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/auto-run-false/ember-cli-build.js:
--------------------------------------------------------------------------------
1 | /* global require, module */
2 |
3 | var EmberApp = require('ember-cli/lib/broccoli/ember-app');
4 |
5 | module.exports = function(defaults) {
6 | var app = new EmberApp(defaults, {
7 | autoRun: false
8 | });
9 |
10 | return app.toTree();
11 | };
12 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/auto-run-true/ember-cli-build.js:
--------------------------------------------------------------------------------
1 | /* global require, module */
2 |
3 | var EmberApp = require('ember-cli/lib/broccoli/ember-app');
4 |
5 | module.exports = function(defaults) {
6 | var app = new EmberApp(defaults, {
7 | autoRun: true
8 | });
9 |
10 | return app.toTree();
11 | };
12 |
--------------------------------------------------------------------------------
/tests/fixtures/leek-config/.ember-cli:
--------------------------------------------------------------------------------
1 | {
2 | "leekOptions": {
3 | "adapterUrls": {
4 | "event": "http://www.example.com/event",
5 | "exception": "http://www.example.com/error",
6 | "timing": "http://www.example.com/timing",
7 | "appview": "http://www.example.com/track"
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/lib/utilities/get-dependency-depth.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = function getDependencyDepth(options) {
4 | var name = options.entity.name;
5 | var nameParts = name.split('/');
6 | var depth = '../..';
7 |
8 | return nameParts.reduce(function(prev) {
9 | return prev + '/..';
10 | }, depth);
11 | };
12 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-registry-ordering/node_modules/first-dummy-preprocessor/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "first-dummy-preprocessor",
3 | "private": true,
4 | "version": "0.0.0",
5 | "keywords": [
6 | "ember-addon"
7 | ],
8 | "dependencies": {
9 | "broccoli-filter": "latest"
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors/node_modules/ember-cool-addon/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ember-cool-addon",
3 | "private": true,
4 | "version": "0.0.0",
5 | "keywords": [
6 | "ember-addon"
7 | ],
8 | "dependencies": {
9 | "broccoli-sass": "latest"
10 | }
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/blueprints/helper/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | /*jshint node:true*/
3 | var normalizeEntityName = require('ember-cli-normalize-entity-name');
4 |
5 | module.exports = {
6 | description: 'Generates a helper function.',
7 | normalizeEntityName: function(entityName) {
8 | return normalizeEntityName(entityName);
9 | }
10 | };
11 |
--------------------------------------------------------------------------------
/lib/utilities/parse-options.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var reduce = require('lodash/reduce');
4 |
5 | module.exports = function parseOptions(args) {
6 | return reduce(args, function(result, arg) {
7 | var parts = arg.split(':');
8 | result[parts[0]] = parts.slice(1).join(':');
9 | return result;
10 | }, {});
11 | };
12 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors-2/node_modules/ember-cool-addon/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ember-cool-addon",
3 | "private": true,
4 | "version": "0.0.0",
5 | "keywords": [
6 | "ember-addon"
7 | ],
8 | "dependencies": {
9 | "dummy-preprocessor": "latest"
10 | }
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/lib/tasks/npm-install.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // Runs `npm install` in cwd
4 |
5 | var NpmTask = require('./npm-task');
6 |
7 | module.exports = NpmTask.extend({
8 | command: 'install',
9 | startProgressMessage: 'Installing packages for tooling via npm',
10 | completionMessage: 'Installed packages for tooling via npm.'
11 | });
12 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors-3/node_modules/ember-shallow-addon/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ember-shallow-addon",
3 | "private": true,
4 | "version": "0.0.0",
5 | "keywords": [
6 | "ember-addon"
7 | ],
8 | "dependencies": {
9 | "ember-deep-addon": "latest"
10 | }
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/blueprints/app/files/.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 |
--------------------------------------------------------------------------------
/blueprints/app/files/tests/helpers/resolver.js:
--------------------------------------------------------------------------------
1 | import Resolver from '../../resolver';
2 | import config from '../../config/environment';
3 |
4 | const resolver = Resolver.create();
5 |
6 | resolver.namespace = {
7 | modulePrefix: config.modulePrefix,
8 | podModulePrefix: config.podModulePrefix
9 | };
10 |
11 | export default resolver;
12 |
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/blueprints/app/files/gitignore:
--------------------------------------------------------------------------------
1 | # See http://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 | testem.log
18 |
--------------------------------------------------------------------------------
/lib/tasks/npm-uninstall.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // Runs `npm uninstall` in cwd
4 |
5 | var NpmTask = require('./npm-task');
6 |
7 | module.exports = NpmTask.extend({
8 | command: 'uninstall',
9 | startProgressMessage: 'Uninstalling packages for tooling via npm',
10 | completionMessage: 'Uninstalled packages for tooling via npm.'
11 | });
12 |
--------------------------------------------------------------------------------
/lib/utilities/get-component-path-option.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = function getPathOption(options) {
4 | var outputPath = 'components';
5 | if (options.path) {
6 | outputPath = options.path;
7 | } else {
8 | if (options.path === '') {
9 | outputPath = '';
10 | }
11 | }
12 | return outputPath;
13 | };
14 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/node_modules/ember-addon-with-dependencies/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ember-addon-with-dependencies",
3 | "private": true,
4 | "version": "0.0.0",
5 | "keywords": [
6 | "ember-addon"
7 | ],
8 | "dependencies": {
9 | "ember-cli": "latest",
10 | "something-else": "latest"
11 | }
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/lib/models/task.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var CoreObject = require('core-object');
4 |
5 | function Task() {
6 | CoreObject.apply(this, arguments);
7 | }
8 |
9 | module.exports = Task;
10 |
11 | Task.__proto__ = CoreObject;
12 |
13 | Task.prototype.run = function(/*options*/) {
14 | throw new Error('Task needs to have run() defined.');
15 | };
16 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/app-import/node_modules/ember-bad-addon/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | name: 'Ember Random Addon',
5 |
6 | included: function included(app) {
7 | this._super.included(app);
8 |
9 | app.import('vendor/ember-random-addon/file-to-import.js', { type: 'jabascript' });
10 |
11 | }
12 | };
13 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/app-import/node_modules/ember-random-addon/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | name: 'Ember Random Addon',
5 |
6 | included: function included(app) {
7 | this._super.included(app);
8 |
9 | app.import('vendor/ember-random-addon/file-to-import.txt', { destDir: 'assets' });
10 | }
11 | };
12 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/custom-environment-config/ember-cli-build.js:
--------------------------------------------------------------------------------
1 | /* global require, module */
2 |
3 | var EmberApp = require('ember-cli/lib/broccoli/ember-app');
4 |
5 | module.exports = function(defaults) {
6 | var app = new EmberApp(defaults, {
7 | configPath: 'config/something-else'
8 | });
9 |
10 | return app.toTree();
11 | };
12 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors-2/node_modules/ember-cool-addon/node_modules/dummy-preprocessor/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "dummy-preprocessor",
3 | "private": true,
4 | "version": "0.0.0",
5 | "keywords": [
6 | "ember-addon"
7 | ],
8 | "dependencies": {
9 | "broccoli-filter": "latest"
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/tests/helpers/conf.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var Configstore = require('configstore');
4 |
5 | var conf = new Configstore('insight-ember-cli');
6 | var optOut = conf.get('optOut');
7 |
8 | module.exports.setup = function() {
9 | conf.set('optOut', true);
10 | };
11 |
12 | module.exports.restore = function() {
13 | conf.set('optOut', optOut);
14 | };
15 |
--------------------------------------------------------------------------------
/blueprints/route-test/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | var testInfo = require('ember-cli-test-info');
4 |
5 | module.exports = {
6 | description: 'Generates a route unit test.',
7 | locals: function(options) {
8 | return {
9 | friendlyTestDescription: testInfo.description(options.entity.name, 'Unit', 'Route')
10 | };
11 | },
12 | };
13 |
--------------------------------------------------------------------------------
/tests/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | env: {
3 | mocha: true,
4 | },
5 | rules: {
6 | // JSHint "expr", disabled due to chai expect assertions
7 | 'no-unused-expressions': 0,
8 |
9 | // JSHint "unused"
10 | 'no-unused-vars': 0,
11 |
12 | // disabled for easier asserting of file contents
13 | 'quotes': 0,
14 | }
15 | };
16 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/commands/addon-command.js:
--------------------------------------------------------------------------------
1 | function Addon() {
2 | this.name = "Ember CLI Addon Command Test"
3 | return this;
4 | }
5 |
6 | Addon.prototype.includedCommands = function() {
7 | return {
8 | 'AddonCommand': {
9 | name: 'addon-command',
10 | aliases: ['ac']
11 | }
12 | };
13 | }
14 |
15 | module.exports = Addon;
16 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/node_modules/ember-non-root-addon/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ember-non-root-addon",
3 | "main": "index.js",
4 | "version": "0.0.0",
5 | "ember-addon": {
6 | "main": "ember-index.js",
7 | "before": "ember-random-addon"
8 | },
9 | "private": true,
10 | "keywords": [
11 | "ember-addon"
12 | ]
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/blueprints/service-test/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | var testInfo = require('ember-cli-test-info');
4 |
5 | module.exports = {
6 | description: 'Generates a service unit test.',
7 | locals: function(options) {
8 | return {
9 | friendlyTestDescription: testInfo.description(options.entity.name, 'Unit', 'Service')
10 | };
11 | },
12 | };
13 |
--------------------------------------------------------------------------------
/docs/yuidoc.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "The Ember CLI API",
3 | "description": "The Ember CLI API: The command line interface for ambitious web applications.",
4 | "version": "1.0 pre",
5 | "url": "http://ember-cli.com/",
6 | "options": {
7 | "paths": [
8 | "../lib"
9 | ],
10 | "exclude": "vendor",
11 | "outdir": "./build"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors-3/node_modules/ember-shallow-addon/addon/components/clitest-shallow-example.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import DeepExample from 'ember-deep-addon/components/clitest-deep-example';
3 |
4 | export default DeepExample.extend({
5 | shallow: __PREPROCESSOR_REPLACEMENT_TOKEN__ //jshint ignore:line
6 | });
7 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors-3/node_modules/ember-shallow-addon/node_modules/ember-deep-addon/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ember-deep-addon",
3 | "private": true,
4 | "version": "0.0.0",
5 | "keywords": [
6 | "ember-addon"
7 | ],
8 | "dependencies": {
9 | "dummy-preprocessor": "latest"
10 | }
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/tests/fixtures/restart-express-server/copy3/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var fs = require('fs');
4 | var path = require('path');
5 | var aCache = require.cache[path.resolve('./subfolder/a')];
6 | var bCache = require.cache[path.resolve('./subfolder/b')];
7 |
8 | module.exports = function () {
9 | fs.writeFileSync('foo.txt', !aCache + ' ' + !bCache);
10 | };
11 |
--------------------------------------------------------------------------------
/tests/fixtures/smoke-tests/js-testem-config/testem.js:
--------------------------------------------------------------------------------
1 | process.env._TESTEM_CONFIG_JS_RAN = true;
2 |
3 | module.exports = {
4 | "framework": "qunit",
5 | "test_page": "tests/index.html?hidepassed",
6 | "disable_watching": true,
7 | "launch_in_ci": [
8 | "PhantomJS"
9 | ],
10 | "launch_in_dev": [
11 | "PhantomJS",
12 | "Chrome"
13 | ]
14 | };
15 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # force unix line endings on all files, needed for Windows npm publishing
2 | # https://github.com/ember-cli/ember-cli/issues/5342
3 | # this may be a temporary solution, as it may affect the dev flow for Windows
4 | # contributors that aren't npm publishers
5 | # another solution may be https://www.npmjs.com/package/npm-text-auto
6 | * text eol=lf
7 | *.png binary
8 |
--------------------------------------------------------------------------------
/blueprints/transform-test/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | var testInfo = require('ember-cli-test-info');
4 |
5 | module.exports = {
6 | description: 'Generates a transform unit test.',
7 | locals: function(options) {
8 | return {
9 | friendlyTestDescription: testInfo.description(options.entity.name, 'Unit', 'Transform')
10 | };
11 | },
12 | };
13 |
--------------------------------------------------------------------------------
/lib/errors/silent.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var SilentError = require('silent-error');
4 | var deprecate = require('../utilities/deprecate');
5 |
6 | Object.defineProperty(module, 'exports', {
7 | get: function () {
8 | deprecate('`ember-cli/lib/errors/silent.js` is deprecated, use `silent-error` instead.', true);
9 | return SilentError;
10 | }
11 | });
12 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | The Ember team and community are committed to everyone having a safe and inclusive experience.
2 |
3 | **Our Community Guidelines / Code of Conduct can be found here**:
4 |
5 | http://emberjs.com/guidelines/
6 |
7 | For a history of updates, see the page history here:
8 |
9 | https://github.com/emberjs/website/commits/master/source/guidelines.html.erb
10 |
--------------------------------------------------------------------------------
/blueprints/adapter-test/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | var testInfo = require('ember-cli-test-info');
4 |
5 | module.exports = {
6 | description: 'Generates an ember-data adapter unit test',
7 | locals: function(options) {
8 | return {
9 | friendlyTestDescription: testInfo.description(options.entity.name, 'Unit', 'Adapter')
10 | };
11 | }
12 | };
13 |
--------------------------------------------------------------------------------
/blueprints/controller-test/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | var testInfo = require('ember-cli-test-info');
4 |
5 | module.exports = {
6 | description: 'Generates a controller unit test.',
7 | locals: function(options) {
8 | return {
9 | friendlyTestDescription: testInfo.description(options.entity.name, 'Unit', 'Controller')
10 | };
11 | }
12 | };
13 |
--------------------------------------------------------------------------------
/blueprints/serializer-test/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | var testInfo = require('ember-cli-test-info');
4 |
5 | module.exports = {
6 | description: 'Generates a serializer unit test.',
7 | locals: function(options) {
8 | return {
9 | friendlyTestDescription: testInfo.description(options.entity.name, 'Unit', 'Serializer')
10 | };
11 | },
12 | };
13 |
--------------------------------------------------------------------------------
/lib/utilities/valid-project-name.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = function(name) {
4 | name = name.toLowerCase();
5 |
6 | if (['test', 'ember', 'ember-cli', 'vendor', 'app'].indexOf(name) > -1) { return false; }
7 | if (name.indexOf('.') > -1) { return false; }
8 | if (!isNaN(parseInt(name.charAt(0), 10))) { return false; }
9 |
10 | return true;
11 | };
12 |
--------------------------------------------------------------------------------
/dev/windows/README.md:
--------------------------------------------------------------------------------
1 | ##### Instructions
2 | 1. Install VirtualBox
3 | 1. Install Vagrant
4 | 1. Run `vagrant up` in this directory
5 | 1. Wait for the command to finish
6 | 1. Open the command prompt in the Windows VM
7 | 1. Run `cd C:\ember-cli`
8 | 1. Run `npm run-script test-all`
9 | 1. When you're done, close the VM
10 |
11 | ##### Cleanup
12 | 1. Run `vagrant destroy -f`
13 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/commands/other-addon-command.js:
--------------------------------------------------------------------------------
1 | function Addon() {
2 | this.name = "Other Ember CLI Addon Command Test"
3 | return this;
4 | }
5 |
6 | Addon.prototype.includedCommands = function() {
7 | return {
8 | 'OtherAddonCommand': {
9 | name: 'other-addon-command',
10 | aliases: ['oac']
11 | }
12 | };
13 | }
14 |
15 | module.exports = Addon;
16 |
--------------------------------------------------------------------------------
/tests/fixtures/generate/acceptance-test-expected.js:
--------------------------------------------------------------------------------
1 | import { test } from 'qunit';
2 | import moduleForAcceptance from 'my-app/tests/helpers/module-for-acceptance';
3 |
4 | moduleForAcceptance('Acceptance | foo');
5 |
6 | test('visiting /foo', function(assert) {
7 | visit('/foo');
8 |
9 | andThen(function() {
10 | assert.equal(currentURL(), '/foo');
11 | });
12 | });
13 |
--------------------------------------------------------------------------------
/tests/helpers/copy-fixture-files.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var path = require('path');
4 | var Promise = require('../../lib/ext/promise');
5 | var copy = Promise.denodeify(require('cpr'));
6 |
7 | var rootPath = process.cwd();
8 |
9 | module.exports = function copyFixtureFiles(sourceDir) {
10 | return copy(path.join(rootPath, 'tests', 'fixtures', sourceDir), '.');
11 | };
12 |
--------------------------------------------------------------------------------
/tests/fixtures/generate/addon-acceptance-test-expected.js:
--------------------------------------------------------------------------------
1 | import { test } from 'qunit';
2 | import moduleForAcceptance from '../../tests/helpers/module-for-acceptance';
3 |
4 | moduleForAcceptance('Acceptance | foo');
5 |
6 | test('visiting /foo', function(assert) {
7 | visit('/foo');
8 |
9 | andThen(function() {
10 | assert.equal(currentURL(), '/foo');
11 | });
12 | });
13 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors-3/node_modules/ember-shallow-addon/node_modules/ember-deep-addon/node_modules/dummy-preprocessor/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "dummy-preprocessor",
3 | "private": true,
4 | "version": "0.0.0",
5 | "keywords": [
6 | "ember-addon"
7 | ],
8 | "dependencies": {
9 | "broccoli-filter": "latest"
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/lib/broccoli/merge-trees.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var upstreamMergeTrees = require('broccoli-merge-trees');
4 |
5 | module.exports = function(inputTree, options) {
6 | options = options || {};
7 | options.description = options.annotation;
8 | var tree = upstreamMergeTrees(inputTree, options);
9 |
10 | tree.description = options && options.description;
11 |
12 | return tree;
13 | };
14 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-registry-ordering/node_modules/second-dummy-preprocessor/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "second-dummy-preprocessor",
3 | "private": true,
4 | "version": "0.0.0",
5 | "keywords": [
6 | "ember-addon"
7 | ],
8 | "dependencies": {
9 | "broccoli-filter": "latest"
10 | },
11 | "ember-addon": {
12 | "before": "first-dummy-preprocessor"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/tests/fixtures/generate/addon-acceptance-test-nested-expected.js:
--------------------------------------------------------------------------------
1 | import { test } from 'qunit';
2 | import moduleForAcceptance from '../../../tests/helpers/module-for-acceptance';
3 |
4 | moduleForAcceptance('Acceptance | foo/bar');
5 |
6 | test('visiting /foo/bar', function(assert) {
7 | visit('/foo/bar');
8 |
9 | andThen(function() {
10 | assert.equal(currentURL(), '/foo/bar');
11 | });
12 | });
13 |
--------------------------------------------------------------------------------
/blueprints/blueprint/files/blueprints/__name__/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 | module.exports = {
3 | description: ''
4 |
5 | // locals: function(options) {
6 | // // Return custom template variables here.
7 | // return {
8 | // foo: options.entity.options.foo
9 | // };
10 | // }
11 |
12 | // afterInstall: function(options) {
13 | // // Perform extra work here.
14 | // }
15 | };
16 |
--------------------------------------------------------------------------------
/blueprints/route-test/files/tests/unit/__path__/__test__.js:
--------------------------------------------------------------------------------
1 | import { moduleFor, test } from 'ember-qunit';
2 |
3 | moduleFor('route:<%= dasherizedModuleName %>', '<%= friendlyTestDescription %>', {
4 | // Specify the other units that are required for this test.
5 | // needs: ['controller:foo']
6 | });
7 |
8 | test('it exists', function(assert) {
9 | let route = this.subject();
10 | assert.ok(route);
11 | });
12 |
--------------------------------------------------------------------------------
/blueprints/util-test/files/tests/unit/utils/__name__-test.js:
--------------------------------------------------------------------------------
1 | import <%= camelizedModuleName %> from '<%= dasherizedModulePrefix %>/utils/<%= dasherizedModuleName %>';
2 | import { module, test } from 'qunit';
3 |
4 | module('<%= friendlyTestName %>');
5 |
6 | // Replace this with your real tests.
7 | test('it works', function(assert) {
8 | let result = <%= camelizedModuleName %>();
9 | assert.ok(result);
10 | });
11 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/wrap-in-eval/ember-cli-build.js:
--------------------------------------------------------------------------------
1 | /* global require, module */
2 |
3 | var EmberApp = require('ember-cli/lib/broccoli/ember-app');
4 |
5 | module.exports = function(defaults) {
6 | var app = new EmberApp(defaults, {
7 | name: require('./package.json').name,
8 | wrapInEval: true,
9 | getEnvJSON: require('./config/environment')
10 | });
11 |
12 | return app.toTree();
13 | };
14 |
--------------------------------------------------------------------------------
/tests/unit/errors/silent-test.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var SilentError = require('silent-error');
4 | var SilentErrorLib = require('../../../lib/errors/silent');
5 | var expect = require('chai').expect;
6 |
7 | describe('SilentError', function() {
8 | it('return silent-error and print a deprecation', function() {
9 | expect(SilentErrorLib, 'returns silent-error').to.equal(SilentError);
10 | });
11 | });
12 |
--------------------------------------------------------------------------------
/blueprints/helper-test/files/tests/unit/helpers/__name__-test.js:
--------------------------------------------------------------------------------
1 | import { <%= camelizedModuleName %> } from '<%= dasherizedModulePrefix %>/helpers/<%= dasherizedModuleName %>';
2 | import { module, test } from 'qunit';
3 |
4 | module('<%= friendlyTestName %>');
5 |
6 | // Replace this with your real tests.
7 | test('it works', function(assert) {
8 | let result = <%= camelizedModuleName %>([42]);
9 | assert.ok(result);
10 | });
11 |
--------------------------------------------------------------------------------
/blueprints/mixin-test/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | var testInfo = require('ember-cli-test-info');
4 |
5 | module.exports = {
6 | description: 'Generates a mixin unit test.',
7 | locals: function(options) {
8 | return {
9 | projectName: options.inRepoAddon ? options.inRepoAddon : options.project.name(),
10 | friendlyTestName: testInfo.name(options.entity.name, 'Unit', 'Mixin')
11 | };
12 | }
13 | };
14 |
--------------------------------------------------------------------------------
/dev/windows/Vagrantfile:
--------------------------------------------------------------------------------
1 | Vagrant.configure("2") do |config|
2 | config.vm.box = "opentable/win-2012r2-standard-amd64-nocm"
3 |
4 | config.vm.synced_folder "../..", "/ember-cli"
5 |
6 | config.vm.provider "virtualbox" do |vb|
7 | vb.gui = true
8 | vb.cpus = 2
9 | vb.memory = 2048
10 | vb.customize ["modifyvm", :id, "--vram", "256"]
11 |
12 | end
13 |
14 | config.vm.provision "shell", path: "install.ps1"
15 | end
16 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/query/app/app.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import Resolver from 'ember-resolver';
3 | import loadInitializers from 'ember-load-initializers';
4 |
5 | Ember.MODEL_FACTORY_INJECTIONS = true;
6 |
7 | var App = Ember.Application.extend({
8 | modulePrefix: 'query',
9 | podModulePrefix: 'app/pods',
10 | Resolver: Resolver
11 | });
12 |
13 | loadInitializers(App, 'query');
14 |
15 | export default App;
16 |
--------------------------------------------------------------------------------
/tests/fixtures/blueprints/basic/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var Blueprint = require('../../../../lib/models/blueprint');
4 | var Promise = require('../../../../lib/ext/promise');
5 |
6 | module.exports = Blueprint.extend({
7 | description: 'A basic blueprint',
8 | beforeInstall: function(options, locals){
9 | return Promise.resolve().then(function(){
10 | locals.replacementTest = 'TESTY';
11 | });
12 | }
13 | });
14 |
--------------------------------------------------------------------------------
/tests/helpers/build-error.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = BuildError;
4 |
5 | function BuildError(input) {
6 | Error.call(this);
7 | this.message = input.message;
8 | this.file = input.file;
9 | this.filename = input.filename; // For testing errors from Uglify
10 | this.line = input.line;
11 | this.col = input.col;
12 | this.stack = input.stack;
13 | }
14 |
15 | BuildError.prototype = Object.create(Error.prototype);
16 |
--------------------------------------------------------------------------------
/blueprints/app/files/.travis.yml:
--------------------------------------------------------------------------------
1 | ---
2 | language: node_js
3 | node_js:
4 | - "0.12"
5 |
6 | sudo: false
7 |
8 | cache:
9 | directories:
10 | - node_modules
11 |
12 | before_install:
13 | - export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH
14 | - "npm config set spin false"
15 | - "npm install -g npm@^2"
16 |
17 | install:
18 | - npm install -g bower
19 | - npm install
20 | - bower install
21 |
22 | script:
23 | - npm test
24 |
--------------------------------------------------------------------------------
/blueprints/vendor-shim/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | var stringUtil = require('ember-cli-string-utils');
4 |
5 | module.exports = {
6 | description: 'Generates an ES6 module shim for global libraries.',
7 | locals: function(options) {
8 | var entity = options.entity;
9 | var rawName = entity.name;
10 | var name = stringUtil.dasherize(rawName);
11 |
12 | return {
13 | name: name
14 | };
15 | },
16 | };
17 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/multiple-sass-files/ember-cli-build.js:
--------------------------------------------------------------------------------
1 | /* global require, module */
2 |
3 | var EmberApp = require('ember-cli/lib/broccoli/ember-app');
4 |
5 | module.exports = function(defaults) {
6 | var app = new EmberApp(defaults, {
7 | name: require('./package.json').name,
8 | outputPaths: { app: { css: { 'main': '/assets/main.css', 'theme/a': '/assets/theme/a.css' } } }
9 | });
10 |
11 | return app.toTree();
12 | };
13 |
--------------------------------------------------------------------------------
/lib/utilities/get-option-args.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = function(option, commandArgs) {
4 | var results = [], value, i;
5 | var optionIndex = commandArgs.indexOf(option);
6 | if (optionIndex === -1) { return results; }
7 |
8 | for (i = optionIndex + 1; i < commandArgs.length; i++) {
9 | value = commandArgs[i];
10 | if (/^\-+/.test(value)) { break; }
11 | results.push(value);
12 | }
13 |
14 | return results;
15 | };
16 |
--------------------------------------------------------------------------------
/blueprints/service-test/files/tests/unit/__path__/__test__.js:
--------------------------------------------------------------------------------
1 | import { moduleFor, test } from 'ember-qunit';
2 |
3 | moduleFor('service:<%= dasherizedModuleName %>', '<%= friendlyTestDescription %>', {
4 | // Specify the other units that are required for this test.
5 | // needs: ['service:foo']
6 | });
7 |
8 | // Replace this with your real tests.
9 | test('it exists', function(assert) {
10 | let service = this.subject();
11 | assert.ok(service);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/commands/addon-command-class.js:
--------------------------------------------------------------------------------
1 | var Command = require('../../../../lib/models/command');
2 |
3 | function Addon() {
4 | this.name = "Ember CLI Addon Class Command Test"
5 | return this;
6 | }
7 |
8 | Addon.prototype.includedCommands = function() {
9 | return {
10 | 'ClassAddonCommand': Command.extend({
11 | name: 'class-addon-command',
12 | aliases: ['oac']
13 | })
14 | };
15 | }
16 |
17 | module.exports = Addon;
18 |
--------------------------------------------------------------------------------
/blueprints/adapter-test/files/tests/unit/__path__/__test__.js:
--------------------------------------------------------------------------------
1 | import { moduleFor, test } from 'ember-qunit';
2 |
3 | moduleFor('adapter:<%= dasherizedModuleName %>', '<%= friendlyTestDescription %>', {
4 | // Specify the other units that are required for this test.
5 | // needs: ['serializer:foo']
6 | });
7 |
8 | // Replace this with your real tests.
9 | test('it exists', function(assert) {
10 | let adapter = this.subject();
11 | assert.ok(adapter);
12 | });
13 |
--------------------------------------------------------------------------------
/lib/broccoli/app-config-from-meta.js:
--------------------------------------------------------------------------------
1 | /* jshint ignore:start */
2 |
3 | try {
4 | var metaName = prefix + '/config/environment';
5 | var rawConfig = Ember['default'].$('meta[name="' + metaName + '"]').attr('content');
6 | var config = JSON.parse(unescape(rawConfig));
7 |
8 | return { 'default': config };
9 | }
10 | catch(err) {
11 | throw new Error('Could not read config from meta tag with name "' + metaName + '".');
12 | }
13 |
14 | /* jshint ignore:end */
15 |
--------------------------------------------------------------------------------
/blueprints/model-test/files/tests/unit/__path__/__test__.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('<%= dasherizedModuleName %>', '<%= friendlyDescription %>', {
4 | // Specify the other units that are required for this test.
5 | <%= typeof needs !== 'undefined' ? needs : '' %>
6 | });
7 |
8 | test('it exists', function(assert) {
9 | let model = this.subject();
10 | // let store = this.store();
11 | assert.ok(!!model);
12 | });
13 |
--------------------------------------------------------------------------------
/blueprints/controller-test/files/tests/unit/__path__/__test__.js:
--------------------------------------------------------------------------------
1 | import { moduleFor, test } from 'ember-qunit';
2 |
3 | moduleFor('controller:<%= dasherizedModuleName %>', '<%= friendlyTestDescription %>', {
4 | // Specify the other units that are required for this test.
5 | // needs: ['controller:foo']
6 | });
7 |
8 | // Replace this with your real tests.
9 | test('it exists', function(assert) {
10 | let controller = this.subject();
11 | assert.ok(controller);
12 | });
13 |
--------------------------------------------------------------------------------
/blueprints/transform-test/files/tests/unit/__path__/__test__.js:
--------------------------------------------------------------------------------
1 | import { moduleFor, test } from 'ember-qunit';
2 |
3 | moduleFor('transform:<%= dasherizedModuleName %>', '<%= friendlyTestDescription %>', {
4 | // Specify the other units that are required for this test.
5 | // needs: ['serializer:foo']
6 | });
7 |
8 | // Replace this with your real tests.
9 | test('it exists', function(assert) {
10 | let transform = this.subject();
11 | assert.ok(transform);
12 | });
13 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "test-project",
3 | "dependencies": {
4 | "jquery": "^1.11.1",
5 | "ember": "1.7.0",
6 | "ember-data": "1.0.0-beta.10",
7 | "ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3",
8 | "ember-cli-test-loader": "rwjblue/ember-cli-test-loader#0.0.4"
9 | },
10 | "devDependencies": {
11 | "ember-qunit": "0.1.8",
12 | "ember-qunit-notifications": "0.0.4",
13 | "qunit": "~1.15.0"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/blueprints/acceptance-test/files/tests/acceptance/__name__-test.js:
--------------------------------------------------------------------------------
1 | import { test } from 'qunit';
2 | import moduleForAcceptance from '<%= testFolderRoot %>/tests/helpers/module-for-acceptance';
3 |
4 | moduleForAcceptance('<%= friendlyTestName %>');
5 |
6 | test('visiting /<%= dasherizedModuleName %>', function(assert) {
7 | visit('/<%= dasherizedModuleName %>');
8 |
9 | andThen(function() {
10 | assert.equal(currentURL(), '/<%= dasherizedModuleName %>');
11 | });
12 | });
13 |
--------------------------------------------------------------------------------
/blueprints/model-test/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | var ModelBlueprint = require('../model');
4 | var testInfo = require('ember-cli-test-info');
5 |
6 | module.exports = {
7 | description: 'Generates a model unit test.',
8 |
9 | locals: function(options) {
10 | var result = ModelBlueprint.locals.apply(this, arguments);
11 |
12 | result.friendlyDescription = testInfo.description(options.entity.name, 'Unit', 'Model');
13 |
14 | return result;
15 | }
16 | };
17 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/pods-with-prefix-templates/app/app.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import Resolver from 'ember-resolver';
3 | import loadInitializers from 'ember-load-initializers';
4 |
5 | Ember.MODEL_FACTORY_INJECTIONS = true;
6 |
7 | var App = Ember.Application.extend({
8 | modulePrefix: 'some-cool-app',
9 | podModulePrefix: 'some-cool-app/pods',
10 | Resolver: Resolver
11 | });
12 |
13 | loadInitializers(App, 'some-cool-app');
14 |
15 | export default App;
16 |
--------------------------------------------------------------------------------
/lib/utilities/valid-component-name.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | var SilentError = require('silent-error');
3 |
4 | module.exports = function(entityName) {
5 | if (!/\-/.test(entityName)) {
6 | throw new SilentError('You specified "' + entityName + '", but in order to prevent ' +
7 | 'clashes with current or future HTML element names, you must include ' +
8 | 'a hyphen in the component name.');
9 | }
10 |
11 | return entityName;
12 | };
13 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/app-import-output-file/ember-cli-build.js:
--------------------------------------------------------------------------------
1 | /* global require, module */
2 |
3 | var EmberApp = require('ember-cli/lib/broccoli/ember-app');
4 |
5 | module.exports = function (defaults) {
6 | var app = new EmberApp(defaults, {});
7 |
8 | app.import('vendor/custom-output-file.js', {outputFile: '/assets/output-file.js'});
9 | app.import('vendor/custom-output-file.css', {outputFile: '/assets/output-file.css'});
10 |
11 | return app.toTree();
12 | };
13 |
14 |
--------------------------------------------------------------------------------
/blueprints/helper-test/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | var testInfo = require('ember-cli-test-info');
4 | var stringUtils = require('ember-cli-string-utils');
5 |
6 | module.exports = {
7 | description: 'Generates a helper unit test.',
8 | locals: function(options) {
9 | return {
10 | friendlyTestName: testInfo.name(options.entity.name, 'Unit', 'Helper'),
11 | dasherizedModulePrefix: stringUtils.dasherize(options.project.config().modulePrefix)
12 | };
13 | }
14 | };
15 |
--------------------------------------------------------------------------------
/blueprints/util-test/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | var testInfo = require('ember-cli-test-info');
4 | var stringUtils = require('ember-cli-string-utils');
5 |
6 | module.exports = {
7 | description: 'Generates a util unit test.',
8 | locals: function(options) {
9 | return {
10 | friendlyTestName: testInfo.name(options.entity.name, 'Unit', 'Utility'),
11 | dasherizedModulePrefix: stringUtils.dasherize(options.project.config().modulePrefix)
12 | };
13 | }
14 | };
15 |
--------------------------------------------------------------------------------
/tests/helpers/proxy-server.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var http = require('http');
4 |
5 | var ProxyServer = function() {
6 | var _this = this;
7 | this.called = false;
8 | this.lastReq = null;
9 | this.httpServer = http.createServer(function(req, res) {
10 | _this.called = true;
11 | _this.lastReq = req;
12 | res.writeHead(200, {'Content-Type': 'text/plain'});
13 | res.end('okay');
14 | });
15 | this.httpServer.listen(3001);
16 | };
17 |
18 | module.exports = ProxyServer;
19 |
--------------------------------------------------------------------------------
/blueprints/app/files/app/app.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import Resolver from './resolver';
3 | import loadInitializers from 'ember-load-initializers';
4 | import config from './config/environment';
5 |
6 | let App;
7 |
8 | Ember.MODEL_FACTORY_INJECTIONS = true;
9 |
10 | App = Ember.Application.extend({
11 | modulePrefix: config.modulePrefix,
12 | podModulePrefix: config.podModulePrefix,
13 | Resolver
14 | });
15 |
16 | loadInitializers(App, config.modulePrefix);
17 |
18 | export default App;
19 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/app-import-with-legacy-files/ember-cli-build.js:
--------------------------------------------------------------------------------
1 | /* global require, module */
2 |
3 | var EmberApp = require('ember-cli/lib/broccoli/ember-app');
4 |
5 | module.exports = function (defaults) {
6 | var app = new EmberApp(defaults, {});
7 |
8 | app.legacyFilesToAppend.push('vendor/legacy-file.js');
9 | app.legacyFilesToAppend.push('vendor/second-legacy-file.js');
10 | app.vendorStaticStyles.push('vendor/legacy-file.css');
11 |
12 | return app.toTree();
13 | };
14 |
15 |
16 |
--------------------------------------------------------------------------------
/blueprints/initializer-test/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | var testInfo = require('ember-cli-test-info');
4 | var stringUtils = require('ember-cli-string-utils');
5 |
6 | module.exports = {
7 | description: 'Generates an initializer unit test.',
8 | locals: function(options) {
9 | return {
10 | friendlyTestName: testInfo.name(options.entity.name, 'Unit', 'Initializer'),
11 | dasherizedModulePrefix: stringUtils.dasherize(options.project.config().modulePrefix)
12 | };
13 | }
14 | };
15 |
--------------------------------------------------------------------------------
/tests/fixtures/project-with-handlebars/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "test-project",
3 | "dependencies": {
4 | "handlebars": "1.3.0",
5 | "jquery": "^1.11.1",
6 | "ember": "1.7.0",
7 | "ember-data": "1.0.0-beta.10",
8 | "ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3",
9 | "ember-cli-test-loader": "rwjblue/ember-cli-test-loader#0.0.4"
10 | },
11 | "devDependencies": {
12 | "ember-qunit": "0.1.8",
13 | "ember-qunit-notifications": "0.0.4",
14 | "qunit": "~1.15.0"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/lib/utilities/deprecate.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var chalk = require('chalk');
4 |
5 | module.exports = function(message, test) {
6 | if (test) {
7 | console.log(chalk.yellow('DEPRECATION: ' + message));
8 | }
9 | };
10 |
11 | module.exports.deprecateUI = function(ui) {
12 | return function(message, test) {
13 | ui.writeDeprecateLine('The deprecateUI utility has been deprecated in favor of ui.writeDeprecateLine');
14 |
15 | test = !test;
16 |
17 | ui.writeDeprecateLine(message, test);
18 | };
19 | };
20 |
--------------------------------------------------------------------------------
/blueprints/instance-initializer-test/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | var testInfo = require('ember-cli-test-info');
4 | var stringUtils = require('ember-cli-string-utils');
5 |
6 | module.exports = {
7 | description: 'Generates an instance initializer unit test.',
8 | locals: function(options) {
9 | return {
10 | friendlyTestName: testInfo.name(options.entity.name, 'Unit', 'Instance Initializer'),
11 | dasherizedModulePrefix: stringUtils.dasherize(options.project.config().modulePrefix)
12 | };
13 | }
14 | };
15 |
--------------------------------------------------------------------------------
/tests/acceptance/missing-before-addon-test.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var path = require('path');
4 | var ember = require('../helpers/ember');
5 | var root = process.cwd();
6 |
7 | describe('Acceptance: missing a before/after addon', function() {
8 | before(function() {
9 | process.chdir(path.join(root, 'tests', 'fixtures', 'missing-before-addon'));
10 | });
11 |
12 | after(function() {
13 | process.chdir(root);
14 | });
15 |
16 | it('does not break ember-cli', function() {
17 | return ember(['help']);
18 | });
19 | });
20 |
--------------------------------------------------------------------------------
/blueprints/mixin-test/files/tests/unit/mixins/__name__-test.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import <%= classifiedModuleName %>Mixin from '<%= projectName %>/mixins/<%= dasherizedModuleName %>';
3 | import { module, test } from 'qunit';
4 |
5 | module('<%= friendlyTestName %>');
6 |
7 | // Replace this with your real tests.
8 | test('it works', function(assert) {
9 | let <%= classifiedModuleName %>Object = Ember.Object.extend(<%= classifiedModuleName %>Mixin);
10 | let subject = <%= classifiedModuleName %>Object.create();
11 | assert.ok(subject);
12 | });
13 |
--------------------------------------------------------------------------------
/blueprints/serializer-test/files/tests/unit/__path__/__test__.js:
--------------------------------------------------------------------------------
1 | import { moduleForModel, test } from 'ember-qunit';
2 |
3 | moduleForModel('<%= dasherizedModuleName %>', '<%= friendlyTestDescription %>', {
4 | // Specify the other units that are required for this test.
5 | needs: ['serializer:<%= dasherizedModuleName %>']
6 | });
7 |
8 | // Replace this with your real tests.
9 | test('it serializes records', function(assert) {
10 | let record = this.subject();
11 |
12 | let serializedRecord = record.serialize();
13 |
14 | assert.ok(serializedRecord);
15 | });
16 |
--------------------------------------------------------------------------------
/tests/unit/utilities/get-package-base-name-test.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var expect = require('chai').expect;
4 | var getPackageBaseName = require('../../../lib/utilities/get-package-base-name');
5 |
6 | describe('getPackageBaseName', function() {
7 | it('should return the full package name if it is unscoped', function() {
8 | expect(getPackageBaseName('my-addon')).to.equal('my-addon');
9 | });
10 |
11 | it('should return the package name without its scope', function() {
12 | expect(getPackageBaseName('@scope/my-addon')).to.equal('my-addon');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/commands/addon-override-intentional.js:
--------------------------------------------------------------------------------
1 | var Command = require('../../../../lib/models/command');
2 |
3 | function Addon() {
4 | this.name = "Other Ember CLI Addon Command To Test Intentional Core Command Override"
5 | return this;
6 | }
7 |
8 | Addon.prototype.includedCommands = function() {
9 | var cmd = Command.extend({
10 | name: 'serve',
11 | description: 'this intentionally overrides the core command'
12 | });
13 | cmd.overrideCore = true
14 |
15 | return {
16 | 'InitOverrideIntentional': cmd
17 | };
18 | }
19 |
20 | module.exports = Addon;
21 |
--------------------------------------------------------------------------------
/tests/unit/utilities/git-repo-test.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var isGitRepo = require('is-git-url');
4 | var expect = require('chai').expect;
5 |
6 | describe('cleanBaseURL()', function() {
7 | it('recognizes git-style urls in various formats', function() {
8 | expect(isGitRepo('https://github.com/trek/app-blueprint-test.git')).to.be.ok;
9 | expect(isGitRepo('git@github.com:trek/app-blueprint-test.git')).to.be.ok;
10 | expect(isGitRepo('git+ssh://user@server/project.git')).to.be.ok;
11 | expect(isGitRepo('git+https://user@server/project.git')).to.be.ok;
12 | });
13 | });
14 |
--------------------------------------------------------------------------------
/tests/unit/utilities/version-utils-test.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var expect = require('chai').expect;
4 | var versionUtils = require('../../../lib/utilities/version-utils');
5 |
6 | describe('version-utils', function() {
7 | it('`isDevelopment` returns false if a release version was passed in', function() {
8 | expect(versionUtils.isDevelopment('0.0.5')).to.equal(false);
9 | });
10 |
11 | it('`isDevelopment` returns true if a development version was passed in', function() {
12 | expect(versionUtils.isDevelopment('0.0.5-master-237cc6024d')).to.equal(true);
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/blueprints/app/files/tests/helpers/start-app.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import Application from '../../app';
3 | import config from '../../config/environment';
4 |
5 | export default function startApp(attrs) {
6 | let application;
7 |
8 | let attributes = Ember.merge({}, config.APP);
9 | attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
10 |
11 | Ember.run(() => {
12 | application = Application.create(attributes);
13 | application.setupForTesting();
14 | application.injectTestHelpers();
15 | });
16 |
17 | return application;
18 | }
19 |
--------------------------------------------------------------------------------
/lib/utilities/attempt-never-index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var isDarwin = /darwin/i.test(require('os').type());
4 | var debug = require('debug')('ember-cli:utilities/attempt-metadata-index-file');
5 |
6 | module.exports = function(dir) {
7 | var path = dir + '/.metadata_never_index';
8 |
9 | if (!isDarwin) {
10 | debug('not darwin, skipping %s (which hints to spotlight to prevent indexing)', path);
11 | return;
12 | }
13 |
14 | debug('creating: %s (to prevent spotlight indexing)', path);
15 |
16 | var fs = require('fs-extra');
17 |
18 | fs.mkdirsSync(dir);
19 | fs.writeFileSync(path);
20 | };
21 |
--------------------------------------------------------------------------------
/blueprints/app/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | var stringUtil = require('ember-cli-string-utils');
4 |
5 | module.exports = {
6 | description: 'The default blueprint for ember-cli projects.',
7 |
8 | locals: function(options) {
9 | var entity = options.entity;
10 | var rawName = entity.name;
11 | var name = stringUtil.dasherize(rawName);
12 | var namespace = stringUtil.classify(rawName);
13 |
14 | return {
15 | name: name,
16 | modulePrefix: name,
17 | namespace: namespace,
18 | emberCLIVersion: require('../../package').version
19 | };
20 | }
21 | };
22 |
--------------------------------------------------------------------------------
/tests/helpers/mock-analytics.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = MockAnalytics;
4 | function MockAnalytics() {
5 | this.tracks = [];
6 | this.trackTimings = [];
7 | this.trackErrors = [];
8 | }
9 |
10 | MockAnalytics.prototype = Object.create({});
11 | MockAnalytics.prototype.track = function(arg) {
12 | this.tracks.push(arg);
13 | };
14 |
15 | MockAnalytics.prototype.trackTiming = function(arg) {
16 | this.trackTimings.push(arg);
17 | };
18 |
19 | MockAnalytics.prototype.trackError = function(arg) {
20 | this.trackErrors.push(arg);
21 | };
22 |
23 | MockAnalytics.prototype.constructor = MockAnalytics;
24 |
--------------------------------------------------------------------------------
/blueprints/http-proxy/files/server/proxies/__name__.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 | var proxyPath = '/<%=camelizedModuleName %>';
3 |
4 | module.exports = function(app) {
5 | // For options, see:
6 | // https://github.com/nodejitsu/node-http-proxy
7 | var proxy = require('http-proxy').createProxyServer({});
8 |
9 | proxy.on('error', function(err, req) {
10 | console.error(err, req.url);
11 | });
12 |
13 | app.use(proxyPath, function(req, res, next){
14 | // include root path in proxied request
15 | req.url = proxyPath + '/' + req.url;
16 | proxy.web(req, res, { target: '<%=proxyUrl %>' });
17 | });
18 | };
19 |
--------------------------------------------------------------------------------
/blueprints/addon/files/ember-cli-build.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 | /* global require, module */
3 | var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
4 |
5 | module.exports = function(defaults) {
6 | var 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 |
--------------------------------------------------------------------------------
/dev/linux/README.md:
--------------------------------------------------------------------------------
1 | ##### Instructions
2 | 1. Clone `ember-cli` into a folder under `C:/Users` in Windows or `/Users` in Mac
3 | 1. Install Docker on [Windows](https://github.com/boot2docker/windows-installer/releases/latest) or [Mac](https://github.com/boot2docker/osx-installer/releases/latest)
4 | 1. Start Boot2Docker
5 | 1. `cd` into your cloned `ember-cli` folder
6 | 1. Run `cd dev/linux`
7 | 1. Run `docker build -t ember-cli .`
8 | 1. Run `docker run -ti --rm=true ember-cli`
9 | 1. Run `cd ~/ember-cli`
10 | 1. Run `npm run-script test-all`
11 | 1. When you're done, run `exit`
12 |
13 | ##### Cleanup
14 | 1. Run `docker rmi ember-cli`
15 |
--------------------------------------------------------------------------------
/lib/commands/unknown.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var Command = require('../models/command');
4 | var SilentError = require('silent-error');
5 | var chalk = require('chalk');
6 |
7 | module.exports = Command.extend({
8 | skipHelp: true,
9 |
10 | printBasicHelp: function() {
11 | this.ui.writeLine(chalk.red('No help entry for \'' + this.commandName + '\''));
12 | },
13 |
14 | validateAndRun: function() {
15 | throw new SilentError('The specified command ' + this.commandName +
16 | ' is invalid. For available options, see' +
17 | ' `ember help`.');
18 | }
19 | });
20 |
--------------------------------------------------------------------------------
/blueprints/app/files/tests/helpers/module-for-acceptance.js:
--------------------------------------------------------------------------------
1 | import { module } from 'qunit';
2 | import startApp from '../helpers/start-app';
3 | import destroyApp from '../helpers/destroy-app';
4 |
5 | export default function(name, options = {}) {
6 | module(name, {
7 | beforeEach() {
8 | this.application = startApp();
9 |
10 | if (options.beforeEach) {
11 | options.beforeEach.apply(this, arguments);
12 | }
13 | },
14 |
15 | afterEach() {
16 | if (options.afterEach) {
17 | options.afterEach.apply(this, arguments);
18 | }
19 |
20 | destroyApp(this.application);
21 | }
22 | });
23 | }
24 |
--------------------------------------------------------------------------------
/lib/commands/install-addon.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var InstallCommand = require('./install');
4 |
5 | module.exports = InstallCommand.extend({
6 | name: 'install:addon',
7 | description: 'This command has been deprecated. Please use `ember install` instead.',
8 | works: 'insideProject',
9 | skipHelp: true,
10 |
11 | anonymousOptions: [
12 | ''
13 | ],
14 |
15 | run: function() {
16 | var warning = 'This command has been deprecated. Please use `ember ';
17 | warning += 'install ` instead.';
18 | this.ui.writeDeprecateLine(warning);
19 | return this._super.run.apply(this, arguments);
20 | }
21 | });
22 |
--------------------------------------------------------------------------------
/tests/helpers/tmp.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var fs = require('fs-extra');
4 | var existsSync = require('exists-sync');
5 | var Promise = require('../../lib/ext/promise');
6 | var remove = Promise.denodeify(fs.remove);
7 | var root = process.cwd();
8 |
9 | module.exports.setup = function(path) {
10 | process.chdir(root);
11 |
12 | return remove(path)
13 | .then(function() {
14 | fs.mkdirsSync(path);
15 | });
16 | };
17 |
18 | module.exports.teardown = function(path) {
19 | process.chdir(root);
20 |
21 | if (existsSync(path)) {
22 | return remove(path);
23 | } else {
24 | return Promise.resolve();
25 | }
26 | };
27 |
--------------------------------------------------------------------------------
/blueprints/app/files/public/crossdomain.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
15 |
16 |
--------------------------------------------------------------------------------
/lib/utilities/find-build-file.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var findUp = require('findup-sync');
4 | var path = require('path');
5 |
6 | module.exports = function(file) {
7 | var buildFilePath = findUp(file);
8 |
9 | // Note
10 | // In the future this should throw
11 | if (buildFilePath === null) {
12 | return null;
13 | }
14 |
15 | var baseDir = path.dirname(buildFilePath);
16 |
17 | process.chdir(baseDir);
18 |
19 | var buildFile = null;
20 | try {
21 | buildFile = require(buildFilePath);
22 | } catch (err) {
23 | err.message = 'Could not require \'' + file + '\': ' + err.message;
24 | throw err;
25 | }
26 |
27 | return buildFile;
28 | };
29 |
--------------------------------------------------------------------------------
/lib/utilities/mk-tmp-dir-in.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var Promise = require('../ext/promise');
4 | var fs = require('fs-extra');
5 | var temp = require('temp');
6 | var mkdir = Promise.denodeify(fs.mkdir);
7 | var mkdirTemp = Promise.denodeify(temp.mkdir);
8 |
9 | function exists(dir) {
10 | return new Promise(function(resolve) {
11 | fs.exists(dir, resolve);
12 | });
13 | }
14 |
15 | function mkTmpDirIn(dir) {
16 | return exists(dir).then(function(doesExist) {
17 | if (!doesExist) {
18 | return mkdir(dir);
19 | }
20 | }).then(function() {
21 | return mkdirTemp({ dir: dir });
22 | });
23 | }
24 |
25 | module.exports = mkTmpDirIn;
26 |
--------------------------------------------------------------------------------
/blueprints/app/files/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "predef": [
3 | "document",
4 | "window",
5 | "-Promise"
6 | ],
7 | "browser": true,
8 | "boss": true,
9 | "curly": true,
10 | "debug": false,
11 | "devel": true,
12 | "eqeqeq": true,
13 | "evil": true,
14 | "forin": false,
15 | "immed": false,
16 | "laxbreak": false,
17 | "newcap": true,
18 | "noarg": true,
19 | "noempty": false,
20 | "nonew": false,
21 | "nomen": false,
22 | "onevar": false,
23 | "plusplus": false,
24 | "regexp": false,
25 | "undef": true,
26 | "sub": true,
27 | "strict": false,
28 | "white": false,
29 | "eqnull": true,
30 | "esnext": true,
31 | "unused": true
32 | }
33 |
--------------------------------------------------------------------------------
/dev/windows/install.ps1:
--------------------------------------------------------------------------------
1 | Set-ExecutionPolicy RemoteSigned -Scope Process -Force
2 | iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
3 |
4 | cinst nodejs.install -y
5 | $ENV:PATH += ";C:\Program Files\nodejs"
6 | npm i -g npm
7 | del "C:\Program Files\nodejs\npm*"
8 | rd "C:\Program Files\nodejs\node_modules" -recurse
9 | $ENV:PATH += ";C:\Users\vagrant\AppData\Roaming\npm"
10 |
11 | cinst git.install -y
12 | $ENV:PATH += ";C:\Program Files (x86)\Git\cmd"
13 |
14 | # cinst git isn't permanently adding to PATH for some reason
15 | [Environment]::SetEnvironmentVariable("Path", $env:Path, [EnvironmentVariableTarget]::Machine)
16 |
17 | cinst phantomjs -y
18 |
--------------------------------------------------------------------------------
/tests/helpers/mock-watcher.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var RSVP = require('rsvp');
4 | var EventEmitter = require('events').EventEmitter;
5 | var path = require('path');
6 |
7 | function MockWatcher() {
8 | EventEmitter.apply(this, arguments);
9 | this.tracks = [];
10 | this.trackTimings = [];
11 | this.trackErrors = [];
12 | }
13 |
14 | module.exports = MockWatcher;
15 |
16 | MockWatcher.prototype = Object.create(EventEmitter.prototype);
17 |
18 | MockWatcher.prototype.then = function() {
19 | var promise = RSVP.resolve({
20 | directory: path.resolve(__dirname, '../fixtures/express-server')
21 | });
22 | return promise.then.apply(promise, arguments);
23 | };
24 |
--------------------------------------------------------------------------------
/lib/commands/uninstall-npm.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var Command = require('../models/command');
4 | var SilentError = require('silent-error');
5 | var Promise = require('../ext/promise');
6 |
7 | module.exports = Command.extend({
8 | name: 'uninstall:npm',
9 | description: 'Npm package uninstall are now managed by the user.',
10 | works: 'insideProject',
11 | skipHelp: true,
12 |
13 | anonymousOptions: [
14 | ''
15 | ],
16 |
17 | run: function() {
18 | var err = 'This command has been removed. Please use `npm uninstall ';
19 | err += ' --save-dev` instead.';
20 | return Promise.reject(new SilentError(err));
21 | }
22 | });
23 |
--------------------------------------------------------------------------------
/lib/commands/install-npm.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var Command = require('../models/command');
4 | var SilentError = require('silent-error');
5 | var Promise = require('../ext/promise');
6 |
7 | module.exports = Command.extend({
8 | name: 'install:npm',
9 | description: 'Npm package installs are now managed by the user.',
10 | works: 'insideProject',
11 | skipHelp: true,
12 |
13 | anonymousOptions: [
14 | ''
15 | ],
16 |
17 | run: function() {
18 | var err = 'This command has been removed. Please use `npm install ';
19 | err += ' --save-dev --save-exact` instead.';
20 | return Promise.reject(new SilentError(err));
21 | }
22 | });
23 |
--------------------------------------------------------------------------------
/tests/unit/utilities/valid-project-name-test.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var validProjectName = require('../../../lib/utilities/valid-project-name');
4 | var expect = require('chai').expect;
5 |
6 | describe('validate project name', function() {
7 | it('invalidates nonconformant project name', function() {
8 | var nonConformantName = 'app';
9 | var validated = validProjectName(nonConformantName);
10 |
11 | expect(validated).to.not.be.ok;
12 | });
13 |
14 |
15 | it('validates conformant project name', function() {
16 | var conformantName = 'my-app';
17 | var validated = validProjectName(conformantName);
18 |
19 | expect(validated).to.be.ok;
20 | });
21 | });
22 |
--------------------------------------------------------------------------------
/lib/commands/install-bower.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var Command = require('../models/command');
4 | var SilentError = require('silent-error');
5 | var Promise = require('../ext/promise');
6 |
7 | module.exports = Command.extend({
8 | name: 'install:bower',
9 | description: 'Bower package install are now managed by the user.',
10 | works: 'insideProject',
11 | skipHelp: true,
12 |
13 | anonymousOptions: [
14 | ''
15 | ],
16 |
17 | run: function() {
18 | var err = 'This command has been removed. Please use `bower install ';
19 | err += ' --save-dev --save-exact` instead.';
20 | return Promise.reject(new SilentError(err));
21 | }
22 | });
23 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/with-addon-test-support/tests/acceptance/main-test.js:
--------------------------------------------------------------------------------
1 | import startApp from '../helpers/start-app';
2 | import destroyApp from '../helpers/destroy-app';
3 | import { module, test } from 'qunit';
4 | import currentText from 'some-cool-addon/test-support/current-text';
5 |
6 | module('Acceptance', {
7 | beforeEach: function() {
8 | this.application = startApp();
9 | },
10 | afterEach: function() {
11 | destroyApp(this.application);
12 | }
13 | });
14 |
15 | test('can invoke helper', function(assert) {
16 | assert.expect(1);
17 |
18 | visit('/')
19 | .then(() => {
20 | assert.ok(currentText(this.application).indexOf('Stuff Here!') !== -1);
21 | });
22 | });
23 |
--------------------------------------------------------------------------------
/blueprints/addon/files/README.md:
--------------------------------------------------------------------------------
1 | # <%= addonName.substring(0,1).toUpperCase() + addonName.substring(1) %>
2 |
3 | This README outlines the details of collaborating on this Ember addon.
4 |
5 | ## Installation
6 |
7 | * `git clone` this repository
8 | * `npm install`
9 | * `bower install`
10 |
11 | ## Running
12 |
13 | * `ember server`
14 | * Visit your app at http://localhost:4200.
15 |
16 | ## Running Tests
17 |
18 | * `npm test` (Runs `ember try:testall` to test your addon against multiple Ember versions)
19 | * `ember test`
20 | * `ember test --server`
21 |
22 | ## Building
23 |
24 | * `ember build`
25 |
26 | For more information on using ember-cli, visit [http://ember-cli.com/](http://ember-cli.com/).
27 |
--------------------------------------------------------------------------------
/tests/fixtures/smoke-tests/passing-test/tests/acceptance/acceptance-test.js:
--------------------------------------------------------------------------------
1 | import moduleForAcceptance from '../helpers/module-for-acceptance';
2 | import QUnit from 'qunit';
3 |
4 | let application, firstArgument;
5 |
6 | moduleForAcceptance('Module', {
7 | beforeEach(assert) {
8 | application = this.application;
9 | firstArgument = assert;
10 | },
11 |
12 | afterEach() {
13 | console.log('afterEach called');
14 | }
15 | });
16 |
17 | QUnit.test('it works', function(assert) {
18 | assert.ok(application, 'beforeEach binds to the setup context');
19 | assert.ok(
20 | Object.getPrototypeOf(firstArgument) === QUnit.assert,
21 | 'first argument is QUnit assert'
22 | );
23 | });
24 |
--------------------------------------------------------------------------------
/blueprints/app/files/.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 | [*.js]
17 | indent_style = space
18 | indent_size = 2
19 |
20 | [*.hbs]
21 | insert_final_newline = false
22 | indent_style = space
23 | indent_size = 2
24 |
25 | [*.css]
26 | indent_style = space
27 | indent_size = 2
28 |
29 | [*.html]
30 | indent_style = space
31 | indent_size = 2
32 |
33 | [*.{diff,md}]
34 | trim_trailing_whitespace = false
35 |
--------------------------------------------------------------------------------
/tests/helpers/mock-express-server.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var RSVP = require('rsvp');
4 | var EventEmitter = require('events').EventEmitter;
5 | var path = require('path');
6 |
7 | function MockExpressServer() {
8 | EventEmitter.apply(this, arguments);
9 | this.tracks = [];
10 | this.trackTimings = [];
11 | this.trackErrors = [];
12 | }
13 |
14 | module.exports = MockExpressServer;
15 |
16 | MockExpressServer.prototype = Object.create(EventEmitter.prototype);
17 |
18 | MockExpressServer.prototype.then = function() {
19 | var promise = RSVP.resolve({
20 | directory: path.resolve(__dirname, '../fixtures/express-server')
21 | });
22 | return promise.then.apply(promise, arguments);
23 | };
24 |
--------------------------------------------------------------------------------
/tests/helpers/mock-server-watcher.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var RSVP = require('rsvp');
4 | var EventEmitter = require('events').EventEmitter;
5 | var path = require('path');
6 |
7 | function MockServerWatcher() {
8 | EventEmitter.apply(this, arguments);
9 | this.tracks = [];
10 | this.trackTimings = [];
11 | this.trackErrors = [];
12 | }
13 |
14 | module.exports = MockServerWatcher;
15 |
16 | MockServerWatcher.prototype = Object.create(EventEmitter.prototype);
17 |
18 | MockServerWatcher.prototype.then = function() {
19 | var promise = RSVP.resolve({
20 | directory: path.resolve(__dirname, '../fixtures/express-server')
21 | });
22 | return promise.then.apply(promise, arguments);
23 | };
24 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/with-app-styles/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "test-project",
3 | "private": true,
4 | "dependencies": {
5 | "something-else": "latest"
6 | },
7 | "ember-addon": {
8 | "paths": ["./lib/ember-super-button"]
9 | },
10 | "devDependencies": {
11 | "ember-resolver": "^2.0.2",
12 | "ember-cli": "latest",
13 | "ember-random-addon": "latest",
14 | "ember-non-root-addon": "latest",
15 | "ember-generated-with-export-addon": "latest",
16 | "non-ember-thingy": "latest",
17 | "ember-before-blueprint-addon": "latest",
18 | "ember-after-blueprint-addon": "latest",
19 | "ember-devDeps-addon": "latest",
20 | "ember-addon-with-dependencies": "latest"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/ui/write-error.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | var chalk = require('chalk');
3 |
4 | module.exports = function writeError(ui, error) {
5 | if (!error) { return; }
6 |
7 | // Uglify errors have a filename instead
8 | var fileName = error.file || error.filename;
9 | if (fileName) {
10 | if (error.line) {
11 | fileName += error.col ? ' (' + error.line + ':' + error.col + ')' : ' (' + error.line + ')';
12 | }
13 | ui.writeLine(chalk.red('File: ' + fileName), 'ERROR');
14 | }
15 |
16 | if (error.message) {
17 | ui.writeLine(chalk.red(error.message), 'ERROR');
18 | } else {
19 | ui.writeLine(chalk.red(error), 'ERROR');
20 | }
21 |
22 | if (error.stack) {
23 | ui.writeLine(error.stack, 'ERROR');
24 | }
25 | };
26 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/simple/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "test-project",
3 | "private": true,
4 | "dependencies": {
5 | "something-else": "latest"
6 | },
7 | "ember-addon": {
8 | "paths": ["./lib/ember-super-button"]
9 | },
10 | "devDependencies": {
11 | "ember-resolver": "^2.0.2",
12 | "ember-cli": "latest",
13 | "ember-random-addon": "latest",
14 | "ember-non-root-addon": "latest",
15 | "ember-generated-with-export-addon": "latest",
16 | "non-ember-thingy": "latest",
17 | "ember-before-blueprint-addon": "latest",
18 | "ember-after-blueprint-addon": "latest",
19 | "ember-devDeps-addon": "latest",
20 | "ember-addon-with-dependencies": "latest",
21 | "loader.js": "latest"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/blueprints/acceptance-test/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | var testInfo = require('ember-cli-test-info');
4 | var pathUtil = require('ember-cli-path-utils');
5 | var stringUtils = require('ember-cli-string-utils');
6 |
7 | module.exports = {
8 | description: 'Generates an acceptance test for a feature.',
9 | locals: function(options) {
10 | var testFolderRoot = stringUtils.dasherize(options.project.name());
11 |
12 | if (options.project.isEmberCLIAddon()) {
13 | testFolderRoot = pathUtil.getRelativeParentPath(options.entity.name, -1, false);
14 | }
15 | return {
16 | testFolderRoot: testFolderRoot,
17 | friendlyTestName: testInfo.name(options.entity.name, 'Acceptance', null)
18 | };
19 | }
20 | };
21 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/custom-output-paths/ember-cli-build.js:
--------------------------------------------------------------------------------
1 | /* global require, module */
2 |
3 | var EmberApp = require('ember-cli/lib/broccoli/ember-app');
4 |
5 | module.exports = function (defaults) {
6 | var app = new EmberApp(defaults, {
7 | outputPaths: {
8 | app: {
9 | html: 'my-app.html',
10 | css: {
11 | 'app': '/css/app.css',
12 | 'theme': '/css/theme/a.css'
13 | },
14 | js: '/js/app.js'
15 | },
16 | vendor: {
17 | css: '/css/vendor.css',
18 | js: '/js/vendor.js'
19 | },
20 | testSupport: {
21 | css: '/css/test-support.css',
22 | js: '/js/test-support.js'
23 | }
24 | }
25 | });
26 |
27 | return app.toTree();
28 | };
29 |
--------------------------------------------------------------------------------
/blueprints/app/files/app/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | <%= namespace %>
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 |
--------------------------------------------------------------------------------
/lib/broccoli/testem.js:
--------------------------------------------------------------------------------
1 | /**
2 | * This is dummy file that exists for the sole purpose
3 | * of allowing tests to run directly in the browser as
4 | * well as by Testem.
5 | *
6 | * Testem is configured to run tests directly against
7 | * the test build of index.html, which requires a
8 | * snippet to load the testem.js file:
9 | *
10 | * This has to go before the qunit framework and app
11 | * tests are loaded.
12 | *
13 | * Testem internally supplies this file. However, if you
14 | * run the tests directly in the browser (localhost:8000/tests),
15 | * this file does not exist.
16 | *
17 | * Hence the purpose of this fake file. This file is served
18 | * directly from the express server to satisify the script load.
19 | */
20 |
--------------------------------------------------------------------------------
/blueprints/initializer-test/files/tests/unit/initializers/__name__-test.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import <%= classifiedModuleName %>Initializer from '<%= dasherizedModulePrefix %>/initializers/<%= dasherizedModuleName %>';
3 | import { module, test } from 'qunit';
4 |
5 | let application;
6 |
7 | module('<%= friendlyTestName %>', {
8 | beforeEach() {
9 | Ember.run(function() {
10 | application = Ember.Application.create();
11 | application.deferReadiness();
12 | });
13 | }
14 | });
15 |
16 | // Replace this with your real tests.
17 | test('it works', function(assert) {
18 | <%= classifiedModuleName %>Initializer.initialize(application);
19 |
20 | // you would normally confirm the results of the initializer here
21 | assert.ok(true);
22 | });
23 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/default-development/tests/integration/app-boots-test.js:
--------------------------------------------------------------------------------
1 | /*jshint strict:false */
2 | /* globals visit, andThen */
3 |
4 | import Ember from 'ember';
5 | import startApp from '../helpers/start-app';
6 | import destroyApp from '../helpers/destroy-app';
7 | import { module, test } from 'qunit';
8 |
9 | module('default-development - Integration', {
10 | beforeEach: function() {
11 | this.application = startApp();
12 | },
13 | afterEach: function() {
14 | destroyApp(this.application);
15 | }
16 | });
17 |
18 | test('the application boots properly', function(assert) {
19 | assert.expect(1);
20 |
21 | visit('/');
22 |
23 | andThen(function() {
24 | assert.equal(Ember.$('#title').text(), 'Welcome to Ember');
25 | });
26 | });
27 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/wrap-in-eval/tests/integration/wrap-in-eval-test.js:
--------------------------------------------------------------------------------
1 | /*jshint strict:false */
2 | /* globals visit, andThen */
3 |
4 | import Ember from 'ember';
5 | import startApp from '../helpers/start-app';
6 | import destroyApp from '../helpers/destroy-app';
7 | import { module, test } from 'qunit';
8 |
9 | module('wrapInEval in-app test', {
10 | beforeEach: function() {
11 | this.application = startApp();
12 | },
13 | afterEach: function() {
14 | destroyApp(this.application);
15 | }
16 | });
17 |
18 | test('the application boots properly with wrapInEval', function(assert) {
19 | assert.expect(1);
20 |
21 | visit('/');
22 |
23 | andThen(function() {
24 | assert.equal(Ember.$('#title').text(), 'Welcome to Ember');
25 | });
26 | });
27 |
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/pods-templates/tests/integration/pods-template-test.js:
--------------------------------------------------------------------------------
1 | /*jshint strict:false */
2 | /* globals visit, andThen */
3 |
4 | import Ember from 'ember';
5 | import startApp from '../helpers/start-app';
6 | import destroyApp from '../helpers/destroy-app';
7 | import { module, test } from 'qunit';
8 |
9 | module('pods based templates', {
10 | beforeEach: function() {
11 | this.application = startApp();
12 | },
13 | afterEach: function() {
14 | destroyApp(this.application);
15 | }
16 | });
17 |
18 | test('the application boots properly with pods based templates', function(assert) {
19 | assert.expect(1);
20 |
21 | visit('/');
22 |
23 | andThen(function() {
24 | assert.equal(Ember.$('#title').text(), 'ZOMG, PODS WORKS!!');
25 | });
26 | });
27 |
--------------------------------------------------------------------------------
/blueprints/addon/files/.travis.yml:
--------------------------------------------------------------------------------
1 | ---
2 | language: node_js
3 | node_js:
4 | - "0.12"
5 |
6 | sudo: false
7 |
8 | cache:
9 | directories:
10 | - node_modules
11 |
12 | env:
13 | - EMBER_TRY_SCENARIO=default
14 | - EMBER_TRY_SCENARIO=ember-1-13
15 | - EMBER_TRY_SCENARIO=ember-release
16 | - EMBER_TRY_SCENARIO=ember-beta
17 | - EMBER_TRY_SCENARIO=ember-canary
18 |
19 | matrix:
20 | fast_finish: true
21 | allow_failures:
22 | - env: EMBER_TRY_SCENARIO=ember-canary
23 |
24 | before_install:
25 | - export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH
26 | - "npm config set spin false"
27 | - "npm install -g npm@^2"
28 |
29 | install:
30 | - npm install -g bower
31 | - npm install
32 | - bower install
33 |
34 | script:
35 | - ember try $EMBER_TRY_SCENARIO test
36 |
--------------------------------------------------------------------------------
/tests/helpers/log-on-failure.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var logSink;
4 |
5 | beforeEach(function() {
6 | logSink = [];
7 | });
8 |
9 | afterEach(function() {
10 | if (this.currentTest.state !== 'passed') {
11 | // It would be preferable to attach the log output to the error object
12 | // (this.currentTest.err) and have Mocha report it somehow, so that the
13 | // error message and log output show up in the same place. This doesn't
14 | // seem to be possible though.
15 | console.log(logSink.join('\n'));
16 | }
17 | logSink = null;
18 | });
19 |
20 | function logOnFailure(s) {
21 | if (logSink === null) {
22 | throw new Error('logOnFailure called outside of test');
23 | } else {
24 | logSink.push(s);
25 | }
26 | }
27 |
28 | module.exports = logOnFailure;
29 |
--------------------------------------------------------------------------------
/lib/utilities/version-utils.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var existsSync = require('exists-sync');
4 | var path = require('path');
5 | var getRepoInfo = require('git-repo-info');
6 |
7 | module.exports = {
8 | emberCLIVersion: function emberCLIVersion() {
9 | var gitPath = path.join(__dirname, '..','..','.git');
10 | var output = [require('../../package.json').version];
11 |
12 | if (existsSync(gitPath)) {
13 | var repoInfo = getRepoInfo(gitPath);
14 |
15 | output.push(repoInfo.branch);
16 | output.push(repoInfo.abbreviatedSha);
17 | }
18 |
19 | return output.join('-');
20 | },
21 |
22 | isDevelopment: function isDevelopment(version) {
23 | // match postfix SHA in dev version
24 | return !!version.match(/\b[0-9a-f]{5,40}\b/);
25 | }
26 | };
27 |
--------------------------------------------------------------------------------
/blueprints/server/files/server/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | // To use it create some files under `mocks/`
4 | // e.g. `server/mocks/ember-hamsters.js`
5 | //
6 | // module.exports = function(app) {
7 | // app.get('/ember-hamsters', function(req, res) {
8 | // res.send('hello');
9 | // });
10 | // };
11 |
12 | module.exports = function(app) {
13 | var globSync = require('glob').sync;
14 | var mocks = globSync('./mocks/**/*.js', { cwd: __dirname }).map(require);
15 | var proxies = globSync('./proxies/**/*.js', { cwd: __dirname }).map(require);
16 |
17 | // Log proxy requests
18 | var morgan = require('morgan');
19 | app.use(morgan('dev'));
20 |
21 | mocks.forEach(function(route) { route(app); });
22 | proxies.forEach(function(route) { route(app); });
23 |
24 | };
25 |
--------------------------------------------------------------------------------
/tests/helpers/file-utils.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var fs = require('fs-extra');
4 | var existsSync = require('exists-sync');
5 |
6 | function touch(path, obj) {
7 | if (!existsSync(path)) {
8 | fs.createFileSync(path);
9 | fs.writeJsonSync(path, obj || {});
10 | }
11 | }
12 |
13 | function replaceFile(path, findString, replaceString) {
14 | if (existsSync(path)) {
15 | var newFile;
16 | var file = fs.readFileSync(path, 'utf-8');
17 | var find = new RegExp(findString);
18 | var match = new RegExp(replaceString);
19 | if (!file.match(match)) {
20 | newFile = file.replace(find, replaceString);
21 | fs.writeFileSync(path, newFile, 'utf-8');
22 | }
23 | }
24 | }
25 |
26 | module.exports = {
27 | touch: touch,
28 | replaceFile: replaceFile
29 | };
30 |
--------------------------------------------------------------------------------
/tests/fixtures/dummy-project-outdated/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "dummy-project",
3 | "version": "0.0.0",
4 | "private": true,
5 | "directories": {
6 | "doc": "doc",
7 | "test": "test"
8 | },
9 | "scripts": {
10 | "start": "ember server",
11 | "build": "ember build",
12 | "test": "ember test"
13 | },
14 | "repository": "https://github.com/ember-cli/ember-cli",
15 | "engines": {
16 | "node": ">= 0.10.0"
17 | },
18 | "author": "",
19 | "license": "MIT",
20 | "devDependencies": {
21 | "body-parser": "^1.2.0",
22 | "broccoli-asset-rev": "^2.1.2",
23 | "broccoli-ember-hbs-template-compiler": "^1.5.0",
24 | "ember-cli": "0.0.1",
25 | "ember-cli-ember-data": "0.1.1",
26 | "ember-cli-ic-ajax": "0.1.1",
27 | "express": "^4.1.1",
28 | "glob": "^3.2.9"
29 | }
30 | }
--------------------------------------------------------------------------------
/tests/fixtures/brocfile-tests/pods-with-prefix-templates/tests/integration/pods-template-test.js:
--------------------------------------------------------------------------------
1 | /*jshint strict:false */
2 | /* globals visit, andThen */
3 |
4 | import Ember from 'ember';
5 | import startApp from '../helpers/start-app';
6 | import destroyApp from '../helpers/destroy-app';
7 | import { module, test } from 'qunit';
8 |
9 | module('pods based templates', {
10 | beforeEach: function() {
11 | this.application = startApp();
12 | },
13 | afterEach: function() {
14 | destroyApp(this.application);
15 | }
16 | });
17 |
18 |
19 | test('the application boots properly with pods based templates with a podModulePrefix set', function(assert) {
20 | assert.expect(1);
21 |
22 | visit('/');
23 |
24 | andThen(function() {
25 | assert.equal(Ember.$('#title').text(), 'ZOMG, PODS WORKS!!');
26 | });
27 | });
28 |
--------------------------------------------------------------------------------
/tests/factories/command-options.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var defaults = require('lodash/defaults');
4 | var MockUI = require('../helpers/mock-ui');
5 | var MockAnalytics = require('../helpers/mock-analytics');
6 | var MockProject = require('../helpers/mock-project');
7 |
8 | function createProject() {
9 | var project = new MockProject();
10 | project.isEmberCLIProject = function() { return true; };
11 | project.config = function() { return {}; };
12 | return project;
13 | }
14 |
15 | module.exports = function CommandOptionsFactory(options) {
16 | options = options || {};
17 | return defaults(options, {
18 | ui: new MockUI(),
19 | analytics: new MockAnalytics(),
20 | tasks: {},
21 | project: options.project || createProject(),
22 | commands: {},
23 | settings: {}
24 | });
25 | };
26 |
--------------------------------------------------------------------------------
/lib/utilities/doc-generator.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var versionUtils = require('./version-utils');
4 | var emberCLIVersion = versionUtils.emberCLIVersion;
5 | var fs = require('fs');
6 |
7 | function DocGenerator(options) {
8 | options = options || {};
9 | this.exec = options.exec || require('child_process').exec;
10 | }
11 |
12 | DocGenerator.prototype.generate = function() {
13 | var command = 'cd docs && ' + fs.realpathSync('./node_modules/.bin/yuidoc') +
14 | ' -q --project-version ' + emberCLIVersion(); // add '-p' flag to produce only JSON and not HTML
15 |
16 | console.log('Executing command: ' + command);
17 | this.exec(command, function(error) { // stdout, stderr
18 | if (error !== null) {
19 | console.log('Error: ' + error);
20 | }
21 | });
22 | };
23 |
24 | module.exports = DocGenerator;
25 |
--------------------------------------------------------------------------------
/tests/fixtures/addon/component-with-template/tests/acceptance/main-test.js:
--------------------------------------------------------------------------------
1 | import startApp from '../helpers/start-app';
2 | import destroyApp from '../helpers/destroy-app';
3 | import { module, test } from 'qunit';
4 |
5 | module('Acceptance', {
6 | beforeEach: function() {
7 | this.application = startApp();
8 | },
9 | afterEach: function() {
10 | destroyApp(this.application);
11 | }
12 | });
13 |
14 | test('renders properly', function(assert) {
15 | visit('/');
16 |
17 | andThen(function() {
18 | var element = find('.basic-thing');
19 | assert.equal(element.first().text().trim(), 'WOOT!!');
20 | });
21 | });
22 |
23 | test('renders imported component', function(assert) {
24 | visit('/');
25 |
26 | andThen(function() {
27 | var element = find('.second-thing');
28 | assert.equal(element.first().text().trim(), 'SECOND!!');
29 | });
30 | });
31 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 | cache:
3 | directories:
4 | $HOME/.npm
5 | $HOME/.cache # includes bowers cache
6 |
7 | language: node_js
8 | node_js:
9 | - "0.10"
10 | - "0.12"
11 | - "4"
12 | - "5"
13 | - node
14 |
15 | os:
16 | - linux
17 |
18 | before_install:
19 | - curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash
20 | - test $TRAVIS_OS_NAME = "osx" && brew update && brew install phantomjs || test $TRAVIS_OS_NAME = "linux"
21 | - npm config set spin false
22 |
23 | install:
24 | - node --version
25 | - npm --version
26 | - git --version
27 | - npm install --no-optional
28 |
29 | script: npm run-script test-all:cover
30 |
31 | after_script:
32 | - npm install coveralls codeclimate-test-reporter
33 | - cat coverage/lcov.info | codeclimate
34 | - cat coverage/lcov.info | node_modules/coveralls/bin/coveralls.js
35 |
--------------------------------------------------------------------------------
/lib/commands/version.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var Command = require('../models/command');
4 |
5 | module.exports = Command.extend({
6 | name: 'version',
7 | description: 'outputs ember-cli version',
8 | aliases: ['v', '--version', '-v'],
9 | works: 'everywhere',
10 |
11 | availableOptions: [
12 | { name: 'verbose', type: Boolean, default: false }
13 | ],
14 |
15 | run: function(options) {
16 | var versions = process.versions;
17 | versions['os'] = process.platform + ' ' + process.arch;
18 |
19 | var alwaysPrint = ['node', 'os'];
20 |
21 | for (var module in versions) {
22 | if (options.verbose || alwaysPrint.indexOf(module) > -1) {
23 | this.printVersion(module, versions[module]);
24 | }
25 | }
26 | },
27 |
28 | printVersion: function(module, version) {
29 | this.ui.writeLine(module + ': ' + version);
30 | }
31 | });
32 |
--------------------------------------------------------------------------------
/lib/tasks/build-watch.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var chalk = require('chalk');
4 | var Task = require('../models/task');
5 | var Watcher = require('../models/watcher');
6 | var Builder = require('../models/builder');
7 | var Promise = require('../ext/promise');
8 |
9 | module.exports = Task.extend({
10 | run: function(options) {
11 | this.ui.startProgress(
12 | chalk.green('Building'), chalk.green('.')
13 | );
14 |
15 | return new Watcher({
16 | ui: this.ui,
17 | builder: new Builder({
18 | ui: this.ui,
19 | outputPath: options.outputPath,
20 | environment: options.environment,
21 | project: this.project
22 | }),
23 | analytics: this.analytics,
24 | options: options
25 | }).then(function() {
26 | return new Promise(function () {}); // Run until failure or signal to exit
27 | });
28 | }
29 | });
30 |
--------------------------------------------------------------------------------
/blueprints/server/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 | var isPackageMissing = require('ember-cli-is-package-missing');
3 |
4 | module.exports = {
5 | description: 'Generates a server directory for mocks and proxies.',
6 |
7 | normalizeEntityName: function() {},
8 |
9 | afterInstall: function(options) {
10 |
11 | var isMorganMissing = isPackageMissing(this, 'morgan');
12 | var isGlobMissing = isPackageMissing(this, 'glob');
13 |
14 | var areDependenciesMissing = isMorganMissing || isGlobMissing;
15 | var libsToInstall = [];
16 |
17 | if (isMorganMissing) {
18 | libsToInstall.push({ name: 'morgan', target: '^1.3.2' });
19 | }
20 |
21 | if (isGlobMissing) {
22 | libsToInstall.push({ name: 'glob', target: '^4.0.5' });
23 | }
24 |
25 | if (!options.dryRun && areDependenciesMissing) {
26 | return this.addPackagesToProject(libsToInstall);
27 | }
28 | }
29 | };
30 |
--------------------------------------------------------------------------------
/lib/commands/addon.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var NewCommand = require('./new');
4 |
5 | module.exports = NewCommand.extend({
6 | name: 'addon',
7 | description: 'Generates a new folder structure for building an addon, complete with test harness.',
8 |
9 | availableOptions: [
10 | { name: 'dry-run', type: Boolean, default: false, aliases: ['d'] },
11 | { name: 'verbose', type: Boolean, default: false, aliases: ['v'] },
12 | { name: 'blueprint', type: String, default: 'addon', aliases: ['b'] },
13 | { name: 'skip-npm', type: Boolean, default: false, aliases: ['sn'] },
14 | { name: 'skip-bower', type: Boolean, default: false, aliases: ['sb'] },
15 | { name: 'skip-git', type: Boolean, default: false, aliases: ['sg'] },
16 | { name: 'directory', type: String , aliases: ['dir'] }
17 | ],
18 |
19 | anonymousOptions: [
20 | ''
21 | ]
22 | });
23 |
--------------------------------------------------------------------------------
/tests/fixtures/help/foo.js:
--------------------------------------------------------------------------------
1 | var versionUtils = require('../../../lib/utilities/version-utils');
2 | var emberCLIVersion = versionUtils.emberCLIVersion;
3 |
4 | module.exports = {
5 | name: 'ember',
6 | description: null,
7 | aliases: [],
8 | works: 'insideProject',
9 | availableOptions: [],
10 | anonymousOptions: [''],
11 | version: emberCLIVersion(),
12 | commands: [
13 | {
14 | name: 'foo',
15 | description: 'Initializes the warp drive.',
16 | aliases: [],
17 | works: 'insideProject',
18 | availableOptions: [
19 | {
20 | aliases: [
21 | 'd'
22 | ],
23 | default: false,
24 | key: 'dryRun',
25 | name: 'dry-run',
26 | required: false
27 | }
28 | ],
29 | anonymousOptions: [
30 | ''
31 | ]
32 | }
33 | ],
34 | addons: []
35 | };
36 |
--------------------------------------------------------------------------------
/blueprints/instance-initializer-test/files/tests/unit/instance-initializers/__name__-test.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import { initialize } from '<%= dasherizedModulePrefix %>/instance-initializers/<%= dasherizedModuleName %>';
3 | import { module, test } from 'qunit';
4 | import destroyApp from '../../helpers/destroy-app';
5 |
6 | module('<%= friendlyTestName %>', {
7 | beforeEach: function() {
8 | Ember.run(() => {
9 | this.application = Ember.Application.create();
10 | this.appInstance = this.application.buildInstance();
11 | });
12 | },
13 | afterEach: function() {
14 | Ember.run(this.appInstance, 'destroy');
15 | destroyApp(this.application);
16 | }
17 | });
18 |
19 | // Replace this with your real tests.
20 | test('it works', function(assert) {
21 | initialize(this.appInstance);
22 |
23 | // you would normally confirm the results of the initializer here
24 | assert.ok(true);
25 | });
26 |
--------------------------------------------------------------------------------
/blueprints/http-proxy/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 |
3 | var Blueprint = require('../../lib/models/blueprint');
4 |
5 | module.exports = {
6 | description: 'Generates a relative proxy to another server.',
7 |
8 | anonymousOptions: [
9 | 'local-path',
10 | 'remote-url'
11 | ],
12 |
13 | locals: function(options) {
14 | var proxyUrl = options.args[2];
15 | return {
16 | path: '/' + options.entity.name.replace(/^\//, ''),
17 | proxyUrl: proxyUrl
18 | };
19 | },
20 |
21 | beforeInstall: function(options) {
22 | var serverBlueprint = Blueprint.lookup('server', {
23 | ui: this.ui,
24 | analytics: this.analytics,
25 | project: this.project
26 | });
27 |
28 | return serverBlueprint.install(options);
29 | },
30 |
31 | afterInstall: function() {
32 | return this.addPackagesToProject([
33 | { name: 'http-proxy', target: '^1.1.6' }
34 | ]);
35 | }
36 | };
37 |
--------------------------------------------------------------------------------
/lib/utilities/printable-properties.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var commandProperties = [
4 | 'name',
5 | 'description',
6 | 'aliases',
7 | 'works',
8 | 'availableOptions',
9 | 'anonymousOptions'
10 | ];
11 | var blueprintProperties = [
12 | 'name',
13 | 'description',
14 | 'availableOptions',
15 | 'anonymousOptions',
16 | 'overridden'
17 | ];
18 |
19 | function forEachWithProperty(properties, forEach, context) {
20 | return properties.filter(function(key) {
21 | return this[key] !== undefined;
22 | }, context).forEach(forEach, context);
23 | }
24 |
25 | module.exports = {
26 | command: {
27 | forEachWithProperty: function(forEach, context) {
28 | return forEachWithProperty(commandProperties, forEach, context);
29 | }
30 | },
31 | blueprint: {
32 | forEachWithProperty: function(forEach, context) {
33 | return forEachWithProperty(blueprintProperties, forEach, context);
34 | }
35 | }
36 | };
37 |
--------------------------------------------------------------------------------
/blueprints/app/files/ember-cli-build.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 | /* global require, module */
3 | var EmberApp = require('ember-cli/lib/broccoli/ember-app');
4 |
5 | module.exports = function(defaults) {
6 | var app = new EmberApp(defaults, {
7 | // Add options here
8 | });
9 |
10 | // Use `app.import` to add additional libraries to the generated
11 | // output files.
12 | //
13 | // If you need to use different assets in different
14 | // environments, specify an object as the first parameter. That
15 | // object's keys should be the environment name and the values
16 | // should be the asset to use in that environment.
17 | //
18 | // If the library that you are including contains AMD or ES6
19 | // modules that you would like to import into your application
20 | // please specify an object with the list of modules as keys
21 | // along with the exports of each module as its value.
22 |
23 | return app.toTree();
24 | };
25 |
--------------------------------------------------------------------------------
/appveyor.yml:
--------------------------------------------------------------------------------
1 | # http://www.appveyor.com/docs/appveyor-yml
2 |
3 | # Test against these versions of Node.js.
4 | environment:
5 | matrix:
6 | - nodejs_version: "0.12"
7 | - nodejs_version: "4.2"
8 | - nodejs_version: "5.0"
9 |
10 | # Install scripts. (runs after repo cloning)
11 | install:
12 | - git rev-parse HEAD
13 | # Get the latest stable version of Node 0.STABLE.latest
14 | - ps: Install-Product node $env:nodejs_version
15 | # Install PhantomJS
16 | - npm install phantomjs-prebuilt
17 | # Typical npm stuff.
18 | - npm version
19 | - npm install
20 |
21 | cache:
22 | - '%APPDATA%\npm-cache'
23 | - '%APPDATA%\Roaming\bower'
24 |
25 |
26 | # Post-install test scripts.
27 | test_script:
28 | # Output useful info for debugging.
29 | - npm version
30 | - cmd: npm run test-all
31 |
32 | # Don't actually build.
33 | build: off
34 |
35 | # Set build version format here instead of in the admin panel.
36 | version: "{build}"
37 |
--------------------------------------------------------------------------------
/tests/unit/settings-file/leek-options-test.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var expect = require('chai').expect;
4 | var MockUI = require('../../helpers/mock-ui');
5 | var Yam = require('yam');
6 | var cliEntry = require('../../../lib/cli');
7 |
8 | describe('.ember-cli leek options', function() {
9 | var cli;
10 | var settings;
11 | var passedOptions;
12 |
13 | before(function() {
14 | settings = new Yam('ember-cli', {
15 | primary: process.cwd() + '/tests/fixtures/leek-config'
16 | });
17 |
18 | cli = cliEntry({
19 | UI: MockUI,
20 | Leek: function (options) {
21 | passedOptions = options;
22 | },
23 | Yam: function () {
24 | return settings;
25 | }
26 | });
27 |
28 | });
29 |
30 | it('should contain the leek options from .ember-cli file', function() {
31 | expect(passedOptions.adapterUrls).to.contain.keys(['event', 'exception', 'timing', 'appview']);
32 | });
33 | });
34 |
--------------------------------------------------------------------------------
/blueprints/http-mock/index.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 | var Blueprint = require('../../lib/models/blueprint');
3 | var isPackageMissing = require('ember-cli-is-package-missing');
4 |
5 | module.exports = {
6 | description: 'Generates a mock api endpoint in /api prefix.',
7 |
8 | anonymousOptions: [
9 | 'endpoint-path'
10 | ],
11 |
12 | locals: function(options) {
13 | return {
14 | path: '/' + options.entity.name.replace(/^\//, '')
15 | };
16 | },
17 |
18 | beforeInstall: function(options) {
19 | var serverBlueprint = Blueprint.lookup('server', {
20 | ui: this.ui,
21 | analytics: this.analytics,
22 | project: this.project
23 | });
24 |
25 | return serverBlueprint.install(options);
26 | },
27 |
28 | afterInstall: function(options) {
29 |
30 | if (!options.dryRun && isPackageMissing(this, 'express')) {
31 | return this.addPackagesToProject([
32 | { name: 'express', target: '^4.8.5' }
33 | ]);
34 | }
35 | }
36 | };
37 |
--------------------------------------------------------------------------------
/lib/utilities/merge-blueprint-options.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var SilentError = require('silent-error');
4 | var Blueprint = require('../models/blueprint');
5 |
6 | /*
7 | * Helper for commands that use a blueprint to merge the blueprint's options
8 | * into the command's options so they can be passed in. Needs to be invoked
9 | * with `this` pointing to the command object, e.g.
10 | *
11 | * var mergeBlueprintOptions = require('../utilities/merge-blueprint-options');
12 | *
13 | * Command.extend({
14 | * beforeRun: mergeBlueprintOptions
15 | * })
16 | */
17 | module.exports = function(rawArgs) {
18 | if (rawArgs.length === 0) {
19 | return;
20 | }
21 | // merge in blueprint availableOptions
22 | var blueprint;
23 | try {
24 | blueprint = Blueprint.lookup(rawArgs[0], {
25 | paths: this.project.blueprintLookupPaths()
26 | });
27 | this.registerOptions(blueprint);
28 | } catch (e) {
29 | SilentError.debugOrThrow('ember-cli/commands/' + this.name, e);
30 | }
31 | };
32 |
--------------------------------------------------------------------------------
/tests/unit/blueprints/component-test.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var Blueprint = require('../../../lib/models/blueprint');
4 | var expect = require('chai').expect;
5 |
6 | describe('blueprint - component', function() {
7 | describe('entityName', function() {
8 | it('throws error when hyphen is not present', function() {
9 | var blueprint = Blueprint.lookup('component');
10 |
11 | expect(function() {
12 | var nonConformantComponentName = 'form';
13 | blueprint.normalizeEntityName(nonConformantComponentName);
14 | }).to.throw(/must include a hyphen in the component name/);
15 | });
16 |
17 |
18 | it('keeps existing behavior by calling Blueprint.normalizeEntityName', function() {
19 | var blueprint = Blueprint.lookup('component');
20 |
21 | expect(function() {
22 | var nonConformantComponentName = 'x-form/';
23 | blueprint.normalizeEntityName(nonConformantComponentName);
24 | }).to.throw(/trailing slash/);
25 | });
26 | });
27 | });
28 |
--------------------------------------------------------------------------------
/tests/helpers/stub.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | stub: function stub(obj, name, value, shouldInvoke) {
5 | var original = obj[name];
6 |
7 | obj[name] = function() {
8 | obj[name].called++;
9 | obj[name].calledWith.push(arguments);
10 | return shouldInvoke ? value.apply(this, arguments) : value;
11 | };
12 |
13 | obj[name]._restore = function() {
14 | obj[name] = original;
15 | };
16 |
17 | obj[name].called = 0;
18 | obj[name].calledWith = [];
19 | return obj[name];
20 | },
21 | stubPath: function stubPath(path) {
22 | return {
23 | basename: function() {
24 | return path;
25 | }
26 | };
27 | },
28 | stubBlueprint: function stubBlueprint() {
29 | return function Blueprint() {
30 | return {
31 | install: function() { }
32 | };
33 | };
34 | },
35 | safeRestore: function(obj, name) {
36 | var value = obj[name];
37 | if (value && value._restore) {
38 | value._restore();
39 | }
40 | }
41 | };
42 |
--------------------------------------------------------------------------------
/tests/unit/utilities/attempt-never-index-test.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var attemptNeverIndex = require('../../../lib/utilities/attempt-never-index');
4 | var existsSync = require('exists-sync');
5 | var quickTemp = require('quick-temp');
6 | var expect = require('chai').expect;
7 | var isDarwin = /darwin/i.test(require('os').type());
8 |
9 | describe('attempt-never-index', function() {
10 | var context = {};
11 | var tmpPath;
12 | before(function() {
13 | tmpPath = quickTemp.makeOrRemake(context, 'attempt-never-index');
14 | });
15 |
16 | after(function() {
17 | quickTemp.remove(context, 'attempt-never-index');
18 | });
19 |
20 | it('sets the hint to spotlight if possible', function() {
21 | expect(existsSync(tmpPath + '/.metadata_never_index')).to.false;
22 |
23 | attemptNeverIndex(tmpPath);
24 |
25 | if (isDarwin) {
26 | expect(existsSync(tmpPath + '/.metadata_never_index')).to.true;
27 | } else {
28 | expect(existsSync(tmpPath + '/.metadata_never_index')).to.false;
29 | }
30 | });
31 | });
32 |
--------------------------------------------------------------------------------
/blueprints/app/files/tests/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "predef": [
3 | "document",
4 | "window",
5 | "location",
6 | "setTimeout",
7 | "$",
8 | "-Promise",
9 | "define",
10 | "console",
11 | "visit",
12 | "exists",
13 | "fillIn",
14 | "click",
15 | "keyEvent",
16 | "triggerEvent",
17 | "find",
18 | "findWithAssert",
19 | "wait",
20 | "DS",
21 | "andThen",
22 | "currentURL",
23 | "currentPath",
24 | "currentRouteName"
25 | ],
26 | "node": false,
27 | "browser": false,
28 | "boss": true,
29 | "curly": true,
30 | "debug": false,
31 | "devel": false,
32 | "eqeqeq": true,
33 | "evil": true,
34 | "forin": false,
35 | "immed": false,
36 | "laxbreak": false,
37 | "newcap": true,
38 | "noarg": true,
39 | "noempty": false,
40 | "nonew": false,
41 | "nomen": false,
42 | "onevar": false,
43 | "plusplus": false,
44 | "regexp": false,
45 | "undef": true,
46 | "sub": true,
47 | "strict": false,
48 | "white": false,
49 | "eqnull": true,
50 | "esnext": true,
51 | "unused": true
52 | }
53 |
--------------------------------------------------------------------------------
/lib/utilities/sequence.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var Promise = require('../ext/promise');
4 | /*
5 | *
6 | * given an array of functions, that may or may not return promises sequence
7 | * will invoke them sequentially. If a promise is encountered sequence will
8 | * wait until it fulfills before moving to the next entry.
9 | *
10 | * ```js
11 | * var tasks = [
12 | * function() { return Promise.resolve(1); },
13 | * 2,
14 | * function() { return timeout(1000).then(function() { return 3; } },
15 | * ];
16 | *
17 | * sequence(tasks).then(function(results) {
18 | * results === [
19 | * 1,
20 | * 2,
21 | * 3
22 | * ]
23 | * });
24 | * ```
25 | *
26 | * @method sequence
27 | * @param tasks
28 | * @return Promise
29 | *
30 | */
31 | module.exports = function sequence(tasks) {
32 | var length = tasks.length;
33 | var current = Promise.resolve();
34 | var results = new Array(length);
35 |
36 | for (var i = 0; i < length; ++i) {
37 | current = results[i] = current.then(tasks[i]);
38 | }
39 |
40 | return Promise.all(results);
41 | };
42 |
--------------------------------------------------------------------------------
/blueprints/model/HELP.md:
--------------------------------------------------------------------------------
1 | You may generate models with as many attrs as you would like to pass. The following attribute types are supported:
2 |
3 | :array
4 | :boolean
5 | :date
6 | :object
7 | :number
8 | :string
9 | :your-custom-transform
10 | :belongs-to:
11 | :has-many:
12 |
13 | For instance: \`ember generate model taco filling:belongs-to:protein toppings:has-many:toppings name:string price:number misc\`
14 | would result in the following model:
15 |
16 | ```js
17 | import DS from 'ember-data';
18 | export default DS.Model.extend({
19 | filling: DS.belongsTo('protein'),
20 | toppings: DS.hasMany('topping'),
21 | name: DS.attr('string'),
22 | price: DS.attr('number'),
23 | misc: DS.attr()
24 | });
25 | ```
26 |
--------------------------------------------------------------------------------
/lib/utilities/platform-checker.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var semver = require('semver');
4 | var debug = require('debug')('ember-cli:platform-checker:');
5 |
6 | var LOWER_RANGE = '0.12.0';
7 | var UPPER_RANGE = '6.0.0';
8 |
9 | module.exports = PlatformChecker;
10 | function PlatformChecker(version) {
11 | this.version = version;
12 | this.isValid = this.checkIsValid();
13 | this.isUntested = this.checkIsUntested();
14 | this.isDeprecated = this.checkIsDeprecated();
15 |
16 | debug('%o', {
17 | version: this.version,
18 | isValid: this.isValid,
19 | isUntested: this.isUntested,
20 | isDeprecated: this.isDeprecated
21 | });
22 | }
23 |
24 | PlatformChecker.prototype.checkIsValid = function() {
25 | return semver.satisfies(this.version, '>=' + LOWER_RANGE + ' <' + UPPER_RANGE);
26 | };
27 |
28 | PlatformChecker.prototype.checkIsDeprecated = function() {
29 | return semver.satisfies(this.version, '<' + LOWER_RANGE);
30 | };
31 |
32 | PlatformChecker.prototype.checkIsUntested = function() {
33 | return semver.satisfies(this.version, '>=' + UPPER_RANGE);
34 | };
35 |
36 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-registry-ordering/node_modules/second-dummy-preprocessor/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var Filter = require('broccoli-filter');
4 |
5 | function DummyFilter(inputTree, options) {
6 | Filter.call(this, inputTree, options);
7 | }
8 |
9 | DummyFilter.prototype = Object.create(Filter.prototype);
10 | DummyFilter.prototype.constructor = DummyFilter;
11 |
12 | DummyFilter.prototype.extensions = ['js'];
13 | DummyFilter.prototype.targetExtension = 'js';
14 |
15 | DummyFilter.prototype.processString = function (string, relativePath) {
16 | return string.replace(/__SECOND_PREPROCESSOR_REPLACEMENT_TOKEN__/, 'replacedByPreprocessor');
17 | };
18 |
19 | module.exports = {
20 | name: 'second-dummy-preprocessor',
21 | setupPreprocessorRegistry: function(type, registry) {
22 | if (type !== 'parent') { return; }
23 | var plugin = {
24 | name: 'second-dummy-preprocessor',
25 | ext: 'js',
26 | toTree: function(tree) {
27 | return new DummyFilter(tree, {});
28 | }
29 | };
30 |
31 | registry.add('js', plugin);
32 | }
33 | };
34 |
--------------------------------------------------------------------------------
/blueprints/addon/files/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) <%= year %>
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 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-registry-ordering/node_modules/first-dummy-preprocessor/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var Filter = require('broccoli-filter');
4 |
5 | function DummyFilter(inputTree, options) {
6 | Filter.call(this, inputTree, options);
7 | }
8 |
9 | DummyFilter.prototype = Object.create(Filter.prototype);
10 | DummyFilter.prototype.constructor = DummyFilter;
11 |
12 | DummyFilter.prototype.extensions = ['js'];
13 | DummyFilter.prototype.targetExtension = 'js';
14 |
15 | DummyFilter.prototype.processString = function (string, relativePath) {
16 | return string.replace(/__FIRST_PREPROCESSOR_REPLACEMENT_TOKEN__/, '__SECOND_PREPROCESSOR_REPLACEMENT_TOKEN__');
17 | };
18 |
19 | module.exports = {
20 | name: 'first-dummy-preprocessor',
21 | setupPreprocessorRegistry: function(type, registry) {
22 | if (type !== 'parent') { return; }
23 | var plugin = {
24 | name: 'first-dummy-preprocessor',
25 | ext: 'js',
26 | toTree: function(tree) {
27 | return new DummyFilter(tree, {});
28 | }
29 | };
30 |
31 | registry.add('js', plugin);
32 | }
33 | };
34 |
--------------------------------------------------------------------------------
/lib/utilities/require-as-hash.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | var stringUtils = require('ember-cli-string-utils');
3 |
4 | // Gathers subclasses of a certain specified base class into a hash.
5 | //
6 | // e.g.:
7 | // Files:
8 | // - ./hamster.js which exports an class of Hamster subclass of Rodent
9 | // - ./parrot.js which exports an instance of Parrot (not a Rodent!)
10 | //
11 | // requireAsHash('./*.js', Rodent):
12 | // {
13 | // Hamster: Hamster // Same as require('./hamster.js')
14 | // }
15 |
16 |
17 | var globSync = require('glob').sync;
18 | var path = require('path');
19 | var getCallerFile = require('get-caller-file');
20 |
21 | module.exports = requireAsHash;
22 | function requireAsHash(pattern, type) {
23 | var callerFileDir = path.dirname(getCallerFile());
24 | return globSync(pattern, { cwd: callerFileDir })
25 | .reduce(function(hash, file) {
26 |
27 | var klass = require(callerFileDir + '/' + file);
28 | if (!type || (klass.prototype instanceof type)) {
29 | hash[stringUtils.classify(path.basename(file, '.js'))] = klass;
30 | }
31 | return hash;
32 | }, {});
33 | }
34 |
--------------------------------------------------------------------------------
/tests/unit/analytics-test.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var expect = require('chai').expect;
4 | var Command = require('../../lib/models/command');
5 | var MockUI = require('../helpers/mock-ui');
6 | var MockProject = require('../helpers/mock-project');
7 | var command;
8 | var called = false;
9 |
10 | beforeEach(function() {
11 | var analytics = {
12 | track: function() {
13 | called = true;
14 | }
15 | };
16 |
17 | var FakeCommand = Command.extend({
18 | name: 'fake-command',
19 | run: function() {}
20 | });
21 |
22 | var project = new MockProject();
23 | project.isEmberCLIProject = function() { return true; };
24 |
25 | command = new FakeCommand({
26 | ui: new MockUI(),
27 | analytics: analytics,
28 | project: project
29 | });
30 | });
31 |
32 | afterEach(function() {
33 | command = null;
34 | });
35 |
36 | describe('analytics', function() {
37 | it('track gets invoked on command.validateAndRun()', function() {
38 | return command.validateAndRun([]).then(function() {
39 | expect(called, 'expected analytics.track to be called').to.be.true;
40 | });
41 | });
42 | });
43 |
--------------------------------------------------------------------------------
/tests/unit/utilities/doc-generator-test.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var DocGenerator = require('../../../lib/utilities/doc-generator.js');
4 | var versionUtils = require('../../../lib/utilities/version-utils');
5 | var emberCLIVersion = versionUtils.emberCLIVersion;
6 | var expect = require('chai').expect;
7 | var path = require('path');
8 | var escapeRegExp = require('escape-string-regexp');
9 |
10 | describe('generateDocs', function() {
11 | it('calls the the appropriate command', function() {
12 | function execFunc() {
13 | var commandPath;
14 |
15 | if (process.platform === 'win32') {
16 | commandPath = escapeRegExp(path.normalize('/node_modules/.bin/yuidoc'));
17 | } else {
18 | commandPath = '/node_modules/yuidocjs/lib/cli.js';
19 | }
20 |
21 | var version = escapeRegExp(emberCLIVersion());
22 | var pattern = 'cd docs && .+' + commandPath + ' -q --project-version ' + version;
23 |
24 | expect(arguments[0], 'yudoc command').to.match(new RegExp(pattern));
25 | }
26 |
27 | new DocGenerator({
28 | exec: execFunc
29 | }).generate();
30 | });
31 | });
32 |
--------------------------------------------------------------------------------
/lib/utilities/path.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | /**
5 | Returns a relative parent path string using the path provided
6 |
7 | @method getRelativeParentPath
8 | @param {String} path The path to relatively get to.
9 | @return {String} the relative path string.
10 | */
11 | getRelativeParentPath: function getRelativeParentPath(path, offset, slash) {
12 | var offsetValue = offset || 0;
13 | var trailingSlash = typeof slash === 'undefined' ? true : slash;
14 | var outputPath = new Array(path.split('/').length + 1 - offsetValue).join('../');
15 |
16 | return trailingSlash ? outputPath : outputPath.substr(0, outputPath.length - 1);
17 | },
18 |
19 | /**
20 | Returns a relative path string using the path provided
21 |
22 | @method getRelativePath
23 | @param {String} path The path to relatively get to.
24 | @return {String} the relative path string.
25 | */
26 | getRelativePath: function getRelativePath(path, offset) {
27 | var offsetValue = offset || 0;
28 | var relativePath = new Array(path.split('/').length - offsetValue).join('../');
29 | return relativePath || './';
30 | }
31 | };
32 |
--------------------------------------------------------------------------------
/bin/ember:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 | 'use strict';
3 |
4 | // Provide a title to the process in `ps`
5 | process.title = 'ember';
6 |
7 | var resolve = require('resolve');
8 | var exit = require('exit');
9 |
10 | resolve('ember-cli', {
11 | basedir: process.cwd()
12 | }, function(error, projectLocalCli) {
13 | var cli;
14 | if (error) {
15 | // If there is an error, resolve could not find the ember-cli
16 | // library from a package.json. Instead, include it from a relative
17 | // path to this script file (which is likely a globally installed
18 | // npm package). Most common cause for hitting this is `ember new`
19 | cli = require('../lib/cli');
20 | } else {
21 | // No error implies a projectLocalCli, which will load whatever
22 | // version of ember-cli you have installed in a local package.json
23 | cli = require(projectLocalCli);
24 | }
25 |
26 | cli({
27 | cliArgs: process.argv.slice(2),
28 | inputStream: process.stdin,
29 | outputStream: process.stdout,
30 | errorStream: process.stderr
31 | }).then(function(result) {
32 | var exitCode = typeof result === 'object' ? result.exitCode : result;
33 | exit(exitCode);
34 | });
35 | });
36 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2013-2016 Stefan Penner, Robert Jackson and ember-cli contributors
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/blueprints/app/files/tests/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | <%= namespace %> 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 |
31 | {{content-for "body-footer"}}
32 | {{content-for "test-body-footer"}}
33 |
34 |
35 |
--------------------------------------------------------------------------------
/blueprints/addon/files/addon-config/ember-try.js:
--------------------------------------------------------------------------------
1 | /*jshint node:true*/
2 | module.exports = {
3 | scenarios: [
4 | {
5 | name: 'default',
6 | bower: {
7 | dependencies: { }
8 | }
9 | },
10 | {
11 | name: 'ember-1-13',
12 | bower: {
13 | dependencies: {
14 | 'ember': '~1.13.0'
15 | },
16 | resolutions: {
17 | 'ember': '~1.13.0'
18 | }
19 | }
20 | },
21 | {
22 | name: 'ember-release',
23 | bower: {
24 | dependencies: {
25 | 'ember': 'components/ember#release'
26 | },
27 | resolutions: {
28 | 'ember': 'release'
29 | }
30 | }
31 | },
32 | {
33 | name: 'ember-beta',
34 | bower: {
35 | dependencies: {
36 | 'ember': 'components/ember#beta'
37 | },
38 | resolutions: {
39 | 'ember': 'beta'
40 | }
41 | }
42 | },
43 | {
44 | name: 'ember-canary',
45 | bower: {
46 | dependencies: {
47 | 'ember': 'components/ember#canary'
48 | },
49 | resolutions: {
50 | 'ember': 'canary'
51 | }
52 | }
53 | }
54 | ]
55 | };
56 |
--------------------------------------------------------------------------------
/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors-2/node_modules/ember-cool-addon/node_modules/dummy-preprocessor/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var Filter = require('broccoli-filter');
4 |
5 | function DummyFilter(inputTree, options) {
6 | Filter.call(this, inputTree, options);
7 | }
8 |
9 | DummyFilter.prototype = Object.create(Filter.prototype);
10 | DummyFilter.prototype.constructor = DummyFilter;
11 |
12 | DummyFilter.prototype.extensions = ['js'];
13 | DummyFilter.prototype.targetExtension = 'js';
14 |
15 | DummyFilter.prototype.transform = function(string, options) {
16 | return string.replace(/__PREPROCESSOR_REPLACEMENT_TOKEN__/, '"replacedByPreprocessor"');
17 | };
18 |
19 | DummyFilter.prototype.processString = function (string, relativePath) {
20 | return this.transform(string, {});
21 | };
22 |
23 | module.exports = {
24 | name: 'dummy-preprocessor',
25 | setupPreprocessorRegistry: function(type, registry) {
26 | if (type !== 'parent') { return; }
27 | var plugin = {
28 | name: 'dummy-preprocessor',
29 | ext: 'js',
30 | toTree: function(tree) {
31 | return new DummyFilter(tree, {});
32 | }
33 | };
34 |
35 | registry.add('js', plugin);
36 | }
37 | };
38 |
--------------------------------------------------------------------------------
/tests/fixtures/ssl/server.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIDLjCCAhYCCQClpT57IEXr0zANBgkqhkiG9w0BAQUFADBZMQswCQYDVQQGEwJB
3 | VTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0
4 | cyBQdHkgTHRkMRIwEAYDVQQDEwlsb2NhbGhvc3QwHhcNMTUwMzE2MTk1NDIyWhcN
5 | NDIwODAxMTk1NDIyWjBZMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0
6 | ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMRIwEAYDVQQDEwls
7 | b2NhbGhvc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCqr6SuXrYh
8 | T4cY2l+EvbxeBthuWIXNxGO50w3GfmqlVFG24Nl5+cpDWf0fr8d7eilqW6O05PTW
9 | ZTKNPaLjf1AQ7HAm2Ql02Q6EWn0BUa9y8njhwdhP+QgcBphmkoSNWQ1+SQEXSIaF
10 | 91fq36/PGY+ZzqY31+OdyZhqEWDhaAdXlzjCZKTMBFijUo2GljJGQ47wpNSaXM1I
11 | kvG1WAbEBB9gbwbbEy94bx23G8AIkzft5qUb8Trjzz4PsAc6RUdULYqmOrKBcfP2
12 | i9pCkXtnpi9ESFSuC3T5Qycl4AcyowOvyln+DXI0YrVmqpJxtgP0iu42fZ7V+X6S
13 | 8B1gz4py9D8BAgMBAAEwDQYJKoZIhvcNAQEFBQADggEBAISek/NhWEd3EtTgJO8P
14 | vT24abyUFxcIF6+6a4DHE6DylpRJ8Aw5xB4ebVBGw6xREbqsCvkDZlosvu0zJBL3
15 | CabzQLB//JyQJ5kg+hqBeB3gk6dzzOmdbdP2Xj42Hvf72e+xO7eI9QPpAz3Sbx1g
16 | plEBUFyQ3ZdX5SrOVGJWw9UeUO2DewETqw2ldRFd9H/Reeai63sY+8g8fXLPh2DW
17 | 6mU+5YclJpKZJmtiUbdpwoKuXJLtjAZ0T5JHSIY9Ddz+H3B8270EaDDFaTkwYs/6
18 | ARcPqIRGcEmsvw+9JvcBHiaDc4bKfOk+fK9Styjbo07Hzy7UpIUXm73Wj0HwFaHf
19 | A74=
20 | -----END CERTIFICATE-----
21 |
--------------------------------------------------------------------------------
/lib/utilities/npm.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var Promise = require('../ext/promise');
4 |
5 | //
6 |
7 | /**
8 | Runs the npm command `command` with the supplied args and load options.
9 |
10 | Please note that the loaded module appears to retain some state, so do not
11 | expect multiple invocations within the same process to work without quirks.
12 | This problem is likely fixable.
13 |
14 | @method npm
15 | @param {String} command The npm command to run.
16 | @param {Array} npmArgs The arguments passed to the npm command.
17 | @param {Array} options The options passed when loading npm.
18 | @param {Module} [npm] A reference to the npm module.
19 | */
20 | module.exports = function npm(command, npmArgs, options/*, npm*/) {
21 | var lib;
22 | if (arguments.length === 4) {
23 | lib = arguments[3];
24 | } else {
25 | lib = require('npm');
26 | }
27 |
28 | var load = Promise.denodeify(lib.load);
29 |
30 | return load(options)
31 | .then(function() {
32 | // if install is denodeified outside load.then(),
33 | // it throws "Call npm.load(config, cb) before using this command."
34 | var operation = Promise.denodeify(lib.commands[command]);
35 |
36 | return operation(npmArgs || []);
37 | });
38 | };
39 |
--------------------------------------------------------------------------------
/tests/unit/utilities/windows-admin-test.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var win = require('../../../lib/utilities/windows-admin');
4 | var expect = require('chai').expect;
5 | var MockUI = require('../../helpers/mock-ui');
6 |
7 | describe('windows-admin', function() {
8 | before(function() {
9 | this.originalPlatform = process.platform;
10 | });
11 |
12 | after(function () {
13 | Object.defineProperty(process, 'platform', {
14 | value: this.originalPlatform
15 | });
16 | });
17 |
18 | it('attempts to determine admin rights if Windows', function(done) {
19 | Object.defineProperty(process, 'platform', {
20 | value: 'win'
21 | });
22 |
23 | win.checkWindowsElevation(new MockUI()).then(function (result) {
24 | expect(result).to.be.ok;
25 | expect(result.windows).to.be.true;
26 | done();
27 | });
28 | });
29 |
30 | it('does not attempt to determine admin rights if not on Windows', function(done) {
31 | Object.defineProperty(process, 'platform', {
32 | value: 'MockOS'
33 | });
34 |
35 | win.checkWindowsElevation(new MockUI()).then(function (result) {
36 | expect(result).to.be.ok;
37 | expect(result.windows).to.be.false;
38 | done();
39 | });
40 | });
41 | });
42 |
--------------------------------------------------------------------------------