Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package scope #67

Merged
merged 3 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
node: [14, 16, 18]
node: [16, 18, 20]

name: Lint (Node ${{ matrix.node }})

Expand All @@ -31,9 +31,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
# No point testing on Node 18 as Webpack 4 will always fail with it due
# to OpenSSL updates. We'll need to handle this before Node 18 hits LTS.
node: [14, 16, 18]
node: [16, 18, 20]

name: Test (Node ${{ matrix.node }}, ${{ matrix.os }})

Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ fractal-fork version history
unreleased
----------

* TBD
* [major] changed package name from `fractal-fork` to `@innoq/fractal-fork`
* [major] drop support for Node 14


0.1.2
Expand Down
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fractal-fork
@innoq/fractal-fork
============

<p>
Expand Down Expand Up @@ -26,22 +26,22 @@ We have used Fractal successfully in customer projects and therefore have the de

We use real Fractal projects to test any changes that we make to the source code. However, this also means that **any feature that we do not personally use for any Fractal projects is at risk of being removed in the future** (especially if it uses dependencies which are poorly maintained).

## Migration Guide from `@frctl/fractal` to `fractal-fork`
## Migration Guide from `@frctl/fractal` to `@innoq/fractal-fork`

The changes to offical Fractal branch are listed here as follows:

* `fractal-fork` uses a single repository for ease of deployment. To migrate from `@frctl/fractal` to `fractal-fork` do the following:
* Replace `require('@frctl/core')` with `require('fractal-fork').core`
* Replace `require('@frctl/fractal')` with `require('fractal-fork').fractal`
* Replace `require('@frctl/handlebars')` with `require('fractal-fork').handlebars`
* Replace `require('@frctl/mandelbrot')` with `require('fractal-fork').mandelbrot`
* Replace `require('@frctl/web')` with `require('fractal-fork').web`
* `@innoq/fractal-fork` uses a single repository for ease of deployment. To migrate from `@frctl/fractal` to `@innoq/fractal-fork` do the following:
* Replace `require('@frctl/core')` with `require('@innoq/fractal-fork').core`
* Replace `require('@frctl/fractal')` with `require('@innoq/fractal-fork').fractal`
* Replace `require('@frctl/handlebars')` with `require('@innoq/fractal-fork').handlebars`
* Replace `require('@frctl/mandelbrot')` with `require('@innoq/fractal-fork').mandelbrot`
* Replace `require('@frctl/web')` with `require('@innoq/fractal-fork').web`
* Replace the `fractal` command in your package.json scripts with `fractal-fork`
* Automatic port discovery is not supported for `fractal-fork`. If a port is blocked, `fractal-fork` will quit with an error and it is the developer's responsibility to set a different port via `--port`.
* `fractal-fork` does not support the `--sync` option for the `start` command. This simplifies the implementation and avoids security vulnerabilities introduces by the `browser-sync` dependency
* `fractal-fork` does not support the `twig`, `nunjucts`, or `react` adapters (if you still need them, it should be possible for you to maintain a separate fork for those adapters)
* `fractal-fork` does not support the `new` CLI command (it's a command that is rarely used because it is only necessary to create the repository once. The alternative is to create the repository structure and `fractal.config.js` by hand. The CLI command was one area which had horrible dependencies which needed to be removed)
* The CLI output for `fractal-fork` is much less pretty -- there are no colors and the console never overwrites previous log output. This means particularly for the `build` command that the console output is much longer
* Automatic port discovery is not supported for `@innoq/fractal-fork`. If a port is blocked, `@innoq/fractal-fork` will quit with an error and it is the developer's responsibility to set a different port via `--port`.
* `@innoq/fractal-fork` does not support the `--sync` option for the `start` command. This simplifies the implementation and avoids security vulnerabilities introduces by the `browser-sync` dependency
* `@innoq/fractal-fork` does not support the `twig`, `nunjucts`, or `react` adapters (if you still need them, it should be possible for you to maintain a separate fork for those adapters)
* `@innoq/fractal-fork` does not support the `new` CLI command (it's a command that is rarely used because it is only necessary to create the repository once. The alternative is to create the repository structure and `fractal.config.js` by hand. The CLI command was one area which had horrible dependencies which needed to be removed)
* The CLI output for `@innoq/fractal-fork` is much less pretty -- there are no colors and the console never overwrites previous log output. This means particularly for the `build` command that the console output is much longer


[Read the full Fractal documentation][docs]
Expand All @@ -60,14 +60,14 @@ Check out the [documentation][docs] for more information.
### Install into your project (recommended)

```shell
npm install fractal-fork --save-dev
npm install @innoq/fractal-fork --save-dev
```

Then create your `fractal.config.js` file in the project root, and configure using the [official documentation][docs] but keeping in mind the changes to imports listed out in [the migration guide](#migration-guide-from-frctlfractal-to-fractal-fork).
Then create your `fractal.config.js` file in the project root, and configure using the [official documentation][docs] but keeping in mind the changes to imports listed out in [the migration guide](#migration-guide-from-frctlfractal-to-innoqfractal-fork).

An example pattern library using the `fractal-fork` library can be found in the `example` folder.
An example pattern library using the `@innoq/fractal-fork` library can be found in the `example` folder.

Then you can either run `npx fractal start` to start up the project, or create an alias under the `scripts` section in your package.json as a shortcut.
Then you can either run `npx fractal-fork start` to start up the project, or create an alias under the `scripts` section in your package.json as a shortcut.

e.g.

Expand Down
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

9. publish

npm publish
npm publish --scope @innoq --access public

10. push to git

Expand Down
4 changes: 2 additions & 2 deletions example/fractal.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
* Require the path module
*/
const path = require('path');
const mandelbrot = require('fractal-fork').mandelbrot;
const mandelbrot = require('..').mandelbrot;

/*
* Require the Fractal module
*/
const fractal = (module.exports = require('fractal-fork').fractal.create());
const fractal = (module.exports = require('..').fractal.create());

/*
* Give your project a title.
Expand Down
6 changes: 3 additions & 3 deletions example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"build": "fractal-fork build"
},
"dependencies": {
"fractal-fork": ".."
"@innoq/fractal-fork": ".."
}
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "fractal-fork",
"name": "@innoq/fractal-fork",
"version": "0.1.2",
"description": "A fork of the popular Fractal Pattern Library",
"main": "src/index.js",
Expand Down
Loading