Skip to content

Commit b018382

Browse files
committed
fix: Add files that were missing from the new ember npm packages.
1 parent 75ec32c commit b018382

File tree

5 files changed

+65
-3
lines changed

5 files changed

+65
-3
lines changed

packages/@css-blocks/ember-app/README.md

+11-3
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,21 @@ This addon is only part of the Ember build pipeline for CSS Blocks! Your applica
1414
2. Also make sure you add `@css-blocks/ember` as a dependency if you are authoring css using CSS Blocks.
1515
3. Run `ember build`.
1616

17-
That's it! For development builds, we'll generate CSS output with some developer-friendly BEM class names so you can better understand your application. For production builds, you'll get a CSS artifact that's been concatenated and minified.
17+
If your application has a `app/styles/app.css` file, the build output of CSS Blocks will be automatically added to end of that file. If your project uses some other filename (E.g. due to preprocessing) then a file named `app/styles/css-blocks.css` is added to your application styles directory during the build and it can be included/imported by your preprocessor or concatenated with other files to produce your application's css file.
1818

19-
This addon also provides a template helper for your application: `-css-blocks-`. We take a closer look at how this helper works in the Ember Build Pipeline Technical Deep Dive. The quick summary is that this helper figures out what styles to apply to any templates or components with an associated CSS Blocks file. Any templates that were previously compiled using the `@css-blocks/ember` addon will reference this helper, so you'll need to make sure you have it available in your app.
19+
If your application uses engines, the `css-blocks` service must be added as a dependency to each engine that uses `@css-blocks/ember`.
20+
21+
That's it! For development builds, we'll generate CSS output with some developer-friendly BEM class names so you can better understand your application. For production builds, you'll get a CSS artifact that's been concatenated, optimized, and minified.
2022

2123
## Options
2224

23-
None at the moment, but when they're available, we'll document them here.
25+
The following options can be passed as options to the `css-blocks` property in your application's `ember-cli-build.js`.
26+
27+
* `output` - `<string>` Changes the filename where css-block's styles are written into the `app/styles` directory during the build. If this is set, the styles are never concatenated automatically with `app/styles/app.css`.
28+
* `aliases` - `<object>` The keys of this object import aliases accept values that are absolute paths to a directory containing CSS Block files. E.g. `{myblocks: path.resolve(__dirname, '../blocks')}` would cause `@block foo from 'myblocks/header.block.css';` to import the `header.block.css` file in the `../blocks` directory.
29+
* `analysisOpts` - Template analysis options. You probably don't need to set these.
30+
* `parserOpts` - Options passed to the CSS Blocks parser and compiler. If not set, these options are loaded automatically from a `css-blocks.config.js` file. Using a CSS Blocks configuration file will allow other tools like the CSS Blocks command line (`@css-blocks/cli`) to load the same options as your ember application.
31+
* `optimization` - Options passed to the Opticss optimizer. This can be used to selectively enable or disable specific optimizations or to explicitly disable all optimizations by setting the `enable` option to `false`.
2432

2533
## Common Gotchas
2634

packages/@css-blocks/ember-app/package.json

+5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
"css-blocks",
1212
"ember-addon"
1313
],
14+
"files": [
15+
"dist",
16+
"*.md",
17+
"test/mocha.opts"
18+
],
1419
"scripts": {
1520
"test": "yarn run test:runner",
1621
"test:runner": "echo TODO",

packages/@css-blocks/ember-utils/package.json

+5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
"keywords": [
1111
"css-blocks"
1212
],
13+
"files": [
14+
"dist",
15+
"*.md",
16+
"test/mocha.opts"
17+
],
1318
"scripts": {
1419
"test": "yarn run test:runner",
1520
"test:runner": "echo 'tested by the ember addons'",

packages/@css-blocks/ember/README.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<p align="center">
2+
<img alt="CSS Blocks" width="480px" src="http://css-blocks.com/static/media/wordmark-animated.012177e4.svg" />
3+
</p>
4+
5+
# @css-blocks/ember
6+
7+
An ember-cli addon for Ember applications using CSS Blocks applications, addons, and engines that author stylesheets using CSS Blocks.
8+
9+
This addon is only part of the Ember build pipeline for CSS Blocks! Any application that consumes CSS Blocks from itself, an addon, or an engine will need the `@css-blocks/ember-app` addon as a dependency.
10+
11+
## Basic Usage
12+
13+
1. Add this addon as a dependency to your application, addon, or engine.
14+
2. Also make sure you the application adds `@css-blocks/ember-app` as a dependency.
15+
3. Run `ember build`. See the [README for `@css-blocks/ember-app](../ember-app/README.md) for more instructions.
16+
17+
## Options
18+
19+
The following options can be passed as options to the `css-blocks` property in your application's `ember-cli-build.js`.
20+
21+
* `output` - `<string>` Changes the filename where css-block's styles are written into the `app/styles` directory during the build. If this is set, the styles are never concatenated automatically with `app/styles/app.css`.
22+
* `aliases` - `<object>` The keys of this object import aliases accept values that are absolute paths to a directory containing CSS Block files. E.g. `{myblocks: path.resolve(__dirname, '../blocks')}` would cause `@block foo from 'myblocks/header.block.css';` to import the `header.block.css` file in the `../blocks` directory.
23+
* `analysisOpts` - Template analysis options. You probably don't need to set these.
24+
* `parserOpts` - Options passed to the CSS Blocks parser and compiler. If not set, these options are loaded automatically from a `css-blocks.config.js` file. Using a CSS Blocks configuration file will allow other tools like the CSS Blocks command line (`@css-blocks/cli`) to load the same options as your ember application.
25+
* `optimization` - Options passed to the Opticss optimizer. This can be used to selectively enable or disable specific optimizations or to explicitly disable all optimizations by setting the `enable` option to `false`.
26+
27+
## Common Gotchas
28+
29+
This section is devoted to common issues you might run into when working with this addon.
30+
31+
### Nothing yet...
32+
33+
There's nothing here yet, but we'll add things here as the need arises.
34+
35+
## More Reading
36+
37+
- [CSS Blocks User Documentation](https://css-blocks.com/)
38+
- Ember Build Pipeline Technical Deep Dive - Link TBD

packages/@css-blocks/ember/package.json

+6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
"css-blocks",
1212
"ember-addon"
1313
],
14+
"files": [
15+
"dist",
16+
"types",
17+
"*.md",
18+
"test/mocha.opts"
19+
],
1420
"scripts": {
1521
"test": "yarn run test:runner",
1622
"test:runner": "mocha --opts test/mocha.opts dist/test",

0 commit comments

Comments
 (0)