This repository has been archived by the owner on Aug 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from ffaubry/master
Improve Ember instructions
- Loading branch information
Showing
7 changed files
with
1,035 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { | ||
applyPolyfills, | ||
defineCustomElements | ||
} from '@esri/calcite-components/dist/loader'; | ||
|
||
// Applying polyfills is only necessary if you support IE11/Edge | ||
applyPolyfills().then(() => { | ||
// define calcite components' custom elements on the window | ||
// define the resource Url as well | ||
defineCustomElements(window, { | ||
resourcesUrl: "assets/calcite/" | ||
}); | ||
|
||
}); | ||
|
||
export function initialize() {} | ||
|
||
export default { | ||
initialize | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,13 @@ | ||
<h1>Hello, Ember!</h1> | ||
<calcite-button>OK</calcite-button> | ||
<calcite-icon icon="banana"></calcite-icon> | ||
{{outlet}} | ||
|
||
<calcite-button icon-end="banana" {{on "click" (fn (mut this.showModal) true)}}>Open Modal</calcite-button> | ||
|
||
<calcite-modal aria-labelledby="modal-title" disable-close-button active={{this.showModal}}> | ||
<h3 slot="header" id="modal-title">Are you happy?</h3> | ||
<div slot="content"> | ||
Because it works! | ||
</div> | ||
<calcite-button slot="secondary" width="full" appearance="outline" {{on "click" (fn (mut this.showModal) false)}}> | ||
Cancel | ||
</calcite-button> | ||
</calcite-modal> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,23 @@ | ||
'use strict'; | ||
|
||
const EmberApp = require('ember-cli/lib/broccoli/ember-app'); | ||
const { | ||
Funnel | ||
} = require('broccoli-funnel'); | ||
|
||
module.exports = function(defaults) { | ||
let app = new EmberApp(defaults, { | ||
// Add options here | ||
}); | ||
module.exports = function (defaults) { | ||
|
||
let app = new EmberApp(defaults, {}); | ||
|
||
// Import the calcite CSS into the app CSS | ||
app.import('node_modules/@esri/calcite-components/dist/calcite/calcite.css'); | ||
// Use `app.import` to add additional libraries to the generated | ||
// output files. | ||
// | ||
// If you need to use different assets in different | ||
// environments, specify an object as the first parameter. That | ||
// object's keys should be the environment name and the values | ||
// should be the asset to use in that environment. | ||
// | ||
// If the library that you are including contains AMD or ES6 | ||
// modules that you would like to import into your application | ||
// please specify an object with the list of modules as keys | ||
// along with the exports of each module as its value. | ||
|
||
return app.toTree(); | ||
// Funnel the calcite icon into the build assets directory | ||
let calciteIconTree = new Funnel('./node_modules/@esri/calcite-components/dist', { | ||
srcDir: '/', | ||
include: ['calcite/assets/*.json'], | ||
destDir: '/assets' | ||
}); | ||
|
||
return app.toTree([calciteIconTree]); | ||
}; |
Oops, something went wrong.