glimmerjs / glimmer-blueprint Goto Github PK
View Code? Open in Web Editor NEW[MOVED] This package is now part of the Glimmer.js monorepo
Home Page: https://github.com/glimmerjs/glimmer.js
[MOVED] This package is now part of the Glimmer.js monorepo
Home Page: https://github.com/glimmerjs/glimmer.js
When scaffolding out the Glimmer blueprint for the first time, I assumed (after watching the EmberConf keynote) that the overall size improvements would be transparently visible to me. Instead I got a 1.8MB (pre-gzipped) bundle which was a little surprising.
Someone pointed out that I needed to run ember build -e production
to strip out the dev assertions and after that I was able to get the advertised ~30KB build. Unfortunately, I think a lot of folks (in particular beginners) aren't going to consider the impact of environment variables on distribution sizes. Would it be out of the question to default ember build
in the package.json below to include the production flag?
https://github.com/glimmerjs/glimmer-blueprint/blob/master/files/package.json#L10
Side: we're running into the "how do you avoid DEV mode being shipped to production" conversation with every major framework atm so this is definitely not an Ember specific issue. Hope y'all don't feel like I'm singling you out or anything. Great work on Glimmer!
Tried using glimmer for the first time today and immediately hit the following wall:
❯ ember new glimmer-test -b @glimmer/blueprint
installing blueprint
create .editorconfig
create .watchmanconfig
create README.md
create config/environment.js
create config/module-map.d.ts
create config/resolver-configuration.d.ts
create config/targets.js
create ember-cli-build.js
create .gitignore
create package.json
create public/robots.txt
create src/index.ts
create src/main.ts
create src/ui/components/glimmer-test/component-test.ts
create src/ui/components/glimmer-test/component.ts
create src/ui/components/glimmer-test/template.hbs
create src/ui/index.html
create src/ui/styles/app.scss
create src/utils/test-helpers/test-helper.ts
create testem.json
create tsconfig.json
create yarn.lock
Error creating new application. Removing generated directory `./glimmer-test`
Command failed: yarn install --ignore-optional --non-interactive
warning ../../package.json: No license field
warning "[email protected]" has incorrect peer dependency "@glimmer/compiler@> 0.26.0".
warning "@glimmer/[email protected]" has incorrect peer dependency "@glimmer/compiler@> 0.23.0 || > 0.24.0-alpha.1 || > 0.25.0-alpha.1".
warning "[email protected]" has incorrect peer dependency "@glimmer/compiler@> 0.23.0 || > 0.24.0-alpha.1 || > 0.25.0-alpha.1".
warning "@glimmer/[email protected]" has incorrect peer dependency "@glimmer/component@>= 0.4.0".
error /Users/developers/Projects/glimmer-test/node_modules/broccoli-sass-source-maps/node_modules/node-sass: Command failed.
Exit code: 1
Command: node scripts/install.js
Arguments:
Directory: /Users/developers/Projects/glimmer-test/node_modules/broccoli-sass-source-maps/node_modules/node-sass
Output:
module.js:529
throw err;
^
Error: Cannot find module 'tough-cookie'
at Function.Module._resolveFilename (module.js:527:15)
at Function.Module._load (module.js:476:23)
at Module.require (module.js:568:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/developers/Projects/glimmer-test/node_modules/request/lib/cookies.js:3:13)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
at Function.Module._load (module.js:500:3)
yarn install v1.0.2
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
[5/5] Building fresh packages...
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error: Command failed: yarn install --ignore-optional --non-interactive
warning ../../package.json: No license field
warning "[email protected]" has incorrect peer dependency "@glimmer/compiler@> 0.26.0".
warning "@glimmer/[email protected]" has incorrect peer dependency "@glimmer/compiler@> 0.23.0 || > 0.24.0-alpha.1 || > 0.25.0-alpha.1".
warning "[email protected]" has incorrect peer dependency "@glimmer/compiler@> 0.23.0 || > 0.24.0-alpha.1 || > 0.25.0-alpha.1".
warning "@glimmer/[email protected]" has incorrect peer dependency "@glimmer/component@>= 0.4.0".
error /Users/developers/Projects/glimmer-test/node_modules/broccoli-sass-source-maps/node_modules/node-sass: Command failed.
Exit code: 1
Command: node scripts/install.js
Arguments:
Directory: /Users/developers/Projects/glimmer-test/node_modules/broccoli-sass-source-maps/node_modules/node-sass
Output:
module.js:529
throw err;
^
Error: Cannot find module 'tough-cookie'
at Function.Module._resolveFilename (module.js:527:15)
at Function.Module._load (module.js:476:23)
at Module.require (module.js:568:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/developers/Projects/glimmer-test/node_modules/request/lib/cookies.js:3:13)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
at Function.Module._load (module.js:500:3)
yarn install v1.0.2
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
[5/5] Building fresh packages...
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
at Promise.all.then.arr (/usr/local/lib/node_modules/ember-cli/node_modules/execa/index.js:231:11)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
➜ projects node -v
v6.10.3
➜ projects npm install -g ember-cli/ember-cli
/home/ewan/.nvm/versions/node/v6.10.3/bin/🐹 -> /home/ewan/.nvm/versions/node/v6.10.3/lib/node_modules/ember-cli/bin/ember
/home/ewan/.nvm/versions/node/v6.10.3/bin/ember -> /home/ewan/.nvm/versions/node/v6.10.3/lib/node_modules/ember-cli/bin/ember
/home/ewan/.nvm/versions/node/v6.10.3/lib
└─┬ [email protected] (git://github.com/ember-cli/ember-cli.git#79112d64affec417b99e4745d671ff6d615418fe)
├── [email protected]
├── [email protected]
└── [email protected]
➜ projects ember new glim -b @glimmer/blueprint
installing blueprint
create .editorconfig
create .watchmanconfig
create README.md
create config/environment.js
create config/module-map.d.ts
create config/resolver-configuration.d.ts
create config/targets.js
create ember-cli-build.js
create .gitignore
create package.json
create public/robots.txt
create src/index.ts
create src/main.ts
create src/ui/components/glim-app/component-test.ts
create src/ui/components/glim-app/component.ts
create src/ui/components/glim-app/template.hbs
create src/ui/index.html
create src/ui/styles/app.scss
create src/utils/test-helpers/test-helper.ts
create testem.json
create tmp/.metadata_never_index
create tsconfig.json
create yarn.lock
Yarn: Installed dependencies
Successfully initialized git.
➜ projects cd glim
➜ glim git:(master) ember build -prod
cleaning up...
Build failed.
The Broccoli Plugin: [Fingerprint] failed with:
SyntaxError: Unexpected token: name (Container)
at JS_Parse_Error.get (eval at <anonymous> (/home/ewan/projects/glim/node_modules/uglify-js/tools/node.js:27:1), <anonymous>:86:23)
at new BroccoliBuildError (/home/ewan/projects/glim/node_modules/broccoli-builder/lib/broccoli-build-error.js:18:29)
at /home/ewan/projects/glim/node_modules/broccoli-builder/lib/builder.js:168:19
at tryCatch (/home/ewan/projects/glim/node_modules/rsvp/dist/rsvp.js:525:12)
at invokeCallback (/home/ewan/projects/glim/node_modules/rsvp/dist/rsvp.js:538:13)
at publish (/home/ewan/projects/glim/node_modules/rsvp/dist/rsvp.js:508:7)
at publishRejection (/home/ewan/projects/glim/node_modules/rsvp/dist/rsvp.js:443:3)
at flush (/home/ewan/projects/glim/node_modules/rsvp/dist/rsvp.js:2400:5)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
The broccoli plugin was instantiated at:
at Fingerprint.Plugin (/home/ewan/projects/glim/node_modules/broccoli-plugin/index.js:7:31)
at Fingerprint.Filter [as constructor] (/home/ewan/projects/glim/node_modules/broccoli-filter/index.js:34:10)
at new Fingerprint (/home/ewan/projects/glim/node_modules/broccoli-asset-rev/lib/fingerprint.js:27:10)
at Fingerprint (/home/ewan/projects/glim/node_modules/broccoli-asset-rev/lib/fingerprint.js:22:12)
at new AssetRev (/home/ewan/projects/glim/node_modules/broccoli-asset-rev/lib/asset-rev.js:27:25)
at AssetRev (/home/ewan/projects/glim/node_modules/broccoli-asset-rev/lib/asset-rev.js:7:12)
at Class.postprocessTree (/home/ewan/projects/glim/node_modules/broccoli-asset-rev/index.js:31:40)
at /home/ewan/projects/glim/node_modules/ember-build-utilities/dist/lib/addons/process-tree.js:10:25
at Array.reduce (native)
at addonProcessTree (/home/ewan/projects/glim/node_modules/ember-build-utilities/dist/lib/addons/process-tree.js:8:32)
I'm having an issue creating a new glimmer app while using the newly released yarn 1.0.1 and node 8.4.0.
(If this would be better filed as a yarn issue please let me know and I'll move it there.)
> ember new traffic-viz -b @glimmer/blueprint
installing blueprint
create .editorconfig
create .watchmanconfig
create README.md
create config/environment.js
create config/module-map.d.ts
create config/resolver-configuration.d.ts
create config/targets.js
create ember-cli-build.js
create .gitignore
create package.json
create public/robots.txt
create src/index.ts
create src/main.ts
create src/ui/components/traffic-viz/component-test.ts
create src/ui/components/traffic-viz/component.ts
create src/ui/components/traffic-viz/template.hbs
create src/ui/index.html
create src/ui/styles/app.scss
create src/utils/test-helpers/test-helper.ts
create testem.json
create tsconfig.json
create yarn.lock
Error creating new application. Removing generated directory `./traffic-viz`
Command failed: yarn install --ignore-optional --verbose --non-interactive
warning "[email protected]" has incorrect peer dependency "@glimmer/compiler@> 0.26.0".
warning "@glimmer/[email protected]" has incorrect peer dependency "@glimmer/compiler@> 0.23.0 || > 0.24.0-alpha.1 || > 0.25.0-alpha.1".
warning "[email protected]" has incorrect peer dependency "@glimmer/compiler@> 0.23.0 || > 0.24.0-alpha.1 || > 0.25.0-alpha.1".
warning "@glimmer/[email protected]" has incorrect peer dependency "@glimmer/component@>= 0.4.0".
error /Users/michael/p/movableink/traffic-viz/node_modules/node-sass: Command failed.
Exit code: 1
Command: node scripts/install.js
Arguments:
Directory: /Users/michael/p/movableink/traffic-viz/node_modules/node-sass
Output:
module.js:491
throw err;
^
Error: Cannot find module 'process-nextick-args'
at Function.Module._resolveFilename (module.js:489:15)
at Function.Module._load (module.js:439:25)
at Module.require (module.js:517:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/michael/p/movableink/traffic-viz/node_modules/readable-stream/lib/_stream_readable.js:26:23)
at Module._compile (module.js:573:30)
at Object.Module._extensions..js (module.js:584:10)
at Module.load (module.js:507:32)
at tryModuleLoad (module.js:470:12)
at Function.Module._load (module.js:462:3)
(the full debug output is ~20k lines and I didn't see anything relevant, but if it helps, it's here: https://gist.github.com/mnutt/5978d98b0dedb0cc7efe157c889e922a)
I've tried yarn cache clean
, removing all global yarn modules, etc. When I roll back to yarn 0.27.5, the issue goes away.
It appears that we're installing both node-sass
4.5.3 and 3.13.1, and unfortunately it's hard to determine which one is causing the issue. I'm able to successfully yarn global add [email protected]
and yarn global add [email protected]
but it doesn't fix the issue.
npm: 4.1.2
ember: ember-cli: 2.12.1 / node: 7.7.4 os: darwin x64
yarn: v0.21.3
I've followed the quickstart instructions on the front page: https://www.glimmerjs.com
$ yarn global add ember-cli/ember-cli
yarn global v0.21.3
warning No license field
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 📃 Building fresh packages...
success Installed "[email protected]" with binaries:
- ember
warning No license field
✨ Done in 29.00s.
$ ember new my-app -b @glimmer/blueprint
Unknown blueprint: @glimmer/blueprint
Creating a new glimmer app from the blueprint and building for production outputs code that contains a let
declaration shadowing a function parameter. This is syntactically valid ES but Safari 10 has a bug related to this and complains "Cannot declare a let variable twice".
This is the Safari bug (it's fixed and in Safari Technology Preview): https://bugs.webkit.org/show_bug.cgi?id=171041
uglify-es
has a workaround for this bug — they added a safari10
mangle option. Adding the following to the ember-cli-build.js
fixes the issue:
'ember-cli-uglify': {
uglify: {
mangle: {
safari10: true
}
}
},
The steps I took to reproduce:
➜ 201-created ember version
ember-cli: 2.14.0-beta.2
node: 6.9.1
os: darwin x64
➜ 201-created ember new my-glimmer-app -b @glimmer/blueprint
installing blueprint
create .editorconfig
create .watchmanconfig
create README.md
create config/environment.js
create config/module-map.d.ts
create config/resolver-configuration.d.ts
create config/targets.js
create ember-cli-build.js
create .gitignore
create package.json
create public/robots.txt
create src/index.ts
create src/main.ts
create src/ui/components/my-glimmer-app/component-test.ts
create src/ui/components/my-glimmer-app/component.ts
create src/ui/components/my-glimmer-app/template.hbs
create src/ui/index.html
create src/ui/styles/app.scss
create src/utils/test-helpers/test-helper.ts
create testem.json
create tsconfig.json
create yarn.lock
Yarn: Installed dependencies
Successfully initialized git.
➜ 201-created cd my-glimmer-app
➜ my-glimmer-app git:(master) ember serve -e production
Livereload server on http://localhost:49153
Build successful (5622ms) – Serving on http://localhost:4200/
Slowest Nodes (totalTime => 5% ) | Total (avg)
----------------------------------------------+---------------------
RollupWithDependencies (1) | 2508ms
UglifyWriter (1) | 1579ms
TypeScript (1) | 1364ms
Visiting localhost:4200 in Safari 10 shows the javascript error in the console, and the app doesn't load.
Steps to reproduce:
ember new playground -b @glimmer/blueprint
cd playground
ember serve
The following error shows up:
Livereload server on http://localhost:49154
Serving on http://localhost:4200/
The Broccoli Plugin: [ResolutionMapBuilder] failed with:
Error: The collection 'components' is not configured to contain a collection 'playground'
at /Users/ts02/Code/glimmer/playground/node_modules/@glimmer/resolution-map-builder/lib/get-module-specifier.js:44:17
at Array.forEach (native)
at module.exports.moduleExtension (/Users/ts02/Code/glimmer/playground/node_modules/@glimmer/resolution-map-builder/lib/get-module-specifier.js:39:11)
at /Users/ts02/Code/glimmer/playground/node_modules/@glimmer/resolution-map-builder/index.js:66:21
at Array.forEach (native)
at ResolutionMapBuilder.build (/Users/ts02/Code/glimmer/playground/node_modules/@glimmer/resolution-map-builder/index.js:63:15)
at /Users/ts02/Code/glimmer/playground/node_modules/broccoli-plugin/read_compat.js:93:34
at tryCatch (/Users/ts02/Code/glimmer/playground/node_modules/rsvp/dist/rsvp.js:539:12)
at invokeCallback (/Users/ts02/Code/glimmer/playground/node_modules/rsvp/dist/rsvp.js:554:13)
at publish (/Users/ts02/Code/glimmer/playground/node_modules/rsvp/dist/rsvp.js:522:7)
When I repeat the same steps as above with a dash in the name (e.g. play-ground
), ember serve
works fine.
We seem to be using syntax in the blueprints that is not supported by Node v4.
Related: glimmerjs/glimmer-website#91
This is similar to issue #74 (ember s doesn't work out of the box).
The Glimmer quickstart "my-app" instructions never work for me. After reading any number of issues (open and closed), and trying to run the command in the various ways, I still can't figure out what's going wrong. Here's a link to the error message I got when running the command as instructed ($ ember new my-app -b @glimmer/blueprint) error message no flag and a link to the error message I got when using the flag --yarn=false. error message with flag.
I'm used to update my Ember applications with ember init
and I'd expect the same to work with glimmer.
I tried running it with ember init -b @glimmer/blueprint
but all I get is:
$ ember init -b @glimmer/blueprint
Unknown blueprint: @glimmer/blueprint
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.