@embroider/addon-dev 8.4.0 → 8.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -15,12 +15,11 @@ For a guide on porting a V1 addon to V2, see https://github.com/embroider-build/
15
15
  - @babel/core
16
16
  - @rollup/plugin-babel
17
17
 
18
- 2. Copy the `./sample-rollup.config.js` in this repo to your own `rollup.config.js`.
19
- 3. Copy the `./sample-babel.config.json` in this repo to your own `babel.config.json`.
18
+ 2. Copy the rollup and babel configs from the [v2 addon blueprint](https://github.com/embroider-build/addon-blueprint)
20
19
 
21
20
  ### addon.publicAssets(path <required>, options)
22
21
 
23
- A rollup plugin to expose a folder of assets. `path` is a required to define which folder to expose. `options.include` is a glob pattern passed to `walkSync.include` to pick files. `options.exlude` is a glob pattern passed to `walkSync.ignore` to exclude files. `options.namespace` is the namespace to expose files, defaults to the package name + the path that you provided e.g. if you call `addon.publicAssets('public')` in a v2 addon named `super-addon` then your namespace will default to `super-addon/public`.
22
+ A rollup plugin to expose a folder of assets. `path` is required to define which folder to expose. `options.include` is a glob pattern passed to `walkSync.include` to pick files. `options.exclude` is a glob pattern passed to `walkSync.ignore` to exclude files. `options.namespace` is the namespace to expose files, defaults to the package name + the path that you provided e.g. if you call `addon.publicAssets('public')` in a v2 addon named `super-addon` then your namespace will default to `super-addon/public`.
24
23
 
25
24
  ### addon.keepAssets(patterns: string[], exports?: 'default' | '*')
26
25
 
@@ -40,7 +39,7 @@ The `exports` option defaults to `undefined` which means the assets are used for
40
39
  addon.keepAssets(["**/*.png"], "default")
41
40
  ```
42
41
 
43
- lets you say `import imageURL from './my-image.png'`. Not that this pattern is **not** automatically supported in V2 addons and you would need to tell apps that consume your addon to handle it in a custom way.
42
+ lets you say `import imageURL from './my-image.png'`. Note that this pattern is **not** automatically supported in V2 addons and you would need to tell apps that consume your addon to handle it in a custom way.
44
43
 
45
44
  ## addon-dev command
46
45
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embroider/addon-dev",
3
- "version": "8.4.0",
3
+ "version": "8.4.2",
4
4
  "description": "Utilities for addon authors",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,7 +17,6 @@
17
17
  "./rollup": "./src/rollup.js"
18
18
  },
19
19
  "files": [
20
- "sample-rollup.config.js",
21
20
  "src/**/*.js",
22
21
  "src/**/*.d.ts",
23
22
  "src/**/*.js.map"
@@ -40,7 +39,7 @@
40
39
  "rollup-plugin-copy-assets": "^2.0.3",
41
40
  "walk-sync": "^3.0.0",
42
41
  "yargs": "^17.0.1",
43
- "@embroider/core": "^4.6.6"
42
+ "@embroider/core": "^4.6.9"
44
43
  },
45
44
  "devDependencies": {
46
45
  "@glimmer/syntax": "^0.94.9",
@@ -1,49 +0,0 @@
1
- import babel from '@rollup/plugin-babel';
2
- import { Addon } from '@embroider/addon-dev/rollup';
3
-
4
- const addon = new Addon({
5
- srcDir: 'src',
6
- destDir: 'dist',
7
- });
8
-
9
- export default {
10
- // This provides defaults that work well alongside `publicEntrypoints` below.
11
- // You can augment this if you need to.
12
- output: addon.output(),
13
-
14
- plugins: [
15
- // These are the modules that users should be able to import from your
16
- // addon. Anything not listed here may get optimized away.
17
- addon.publicEntrypoints(['components/**/*.js', 'index.js']),
18
-
19
- // These are the modules that should get reexported into the traditional
20
- // "app" tree. Things in here should also be in publicEntrypoints above, but
21
- // not everything in publicEntrypoints necessarily needs to go here.
22
- addon.appReexports(['components/welcome-page.js']),
23
-
24
- // This babel config should *not* apply presets or compile away ES modules.
25
- // It exists only to provide development niceties for you, like automatic
26
- // template colocation.
27
- //
28
- // By default, this will load the actual babel config from the file
29
- // babel.config.json.
30
- babel({
31
- babelHelpers: 'bundled',
32
- }),
33
-
34
- // Follow the V2 Addon rules about dependencies. Your code can import from
35
- // `dependencies` and `peerDependencies` as well as standard Ember-provided
36
- // package names.
37
- addon.dependencies(),
38
-
39
- // Ensure that standalone .hbs files are properly integrated as Javascript.
40
- addon.hbs(),
41
-
42
- // addons are allowed to contain imports of .css files, which we want rollup
43
- // to leave alone and keep in the published output.
44
- addon.keepAssets(['**/*.css']),
45
-
46
- // Remove leftover build artifacts when starting a new build.
47
- addon.clean(),
48
- ],
49
- };