@apollion-dsi/scripts
v0.11.1
Published
Apollion Framework CLI
Readme
@apollion-dsi/scripts
Apollion DS's Create-React-App-style CLI — hides webpack 5 +
babel + jest 30 + ts (6.x) behind four commands: create,
dev, build, test. Keeps the consumer free from configuring
bundlers/loaders.
Stack
- webpack 5.x + Babel 7 (
preset-env,preset-react,preset-typescript) - babel-plugin-relay + babel-plugin-styled-components
- react-refresh (HMR)
- jest 30 +
ts-jest+@testing-library/react - Peer: typescript 6.x
Creating a new project
yarn dlx @apollion-dsi/scripts create project-name
cd project-name
yarn startApollion uses Yarn 4 (Berry). Do not use npm.
Existing projects
yarn add --dev @apollion-dsi/scriptspackage.json:
{
"scripts": {
"dev": "scripts dev",
"build": "scripts build",
"test": "scripts test"
}
}Minimal structure:
project-name
├── package.json
├── public/index.html
└── src/index.tsxCommands
| Command | What it does |
|---|---|
| yarn start | Webpack dev-server with HMR at http://localhost:3000 |
| yarn build | Production bundle in build/ |
| yarn test | Jest --watch against files changed since the last commit |
Shared config (ESLint + Prettier)
@apollion-dsi/scripts re-exports the @apollion-dsi/eslint-config
config under two subpaths, so consumers that only depend on scripts resolve
the config without adding eslint-config by hand:
// eslint.config.js
const apollion = require('@apollion-dsi/scripts/eslint');
module.exports = [...apollion];
// .prettierrc.js
module.exports = require('@apollion-dsi/scripts/prettier');The template already ships this way. Resolving via scripts (a direct dep) is
hoist-independent — it works the same under Yarn node-modules, npm, pnpm
strict, and Yarn PnP. Importing @apollion-dsi/eslint-config directly only
resolved when the package manager hoisted the transitive dep to the consumer's
root.
Conventions (template)
- ESLint via
@apollion-dsi/scripts/eslint(ESLint 9 flat config). - Prettier 3 via
@apollion-dsi/scripts/prettier. - TypeScript 6 strict.
- Commit lint (Conventional Commits) + Husky 9.
- Optional
.editorconfig(ESLint covers formatting).
License
MIT — © Apollion DS Team.
