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

chore: remove preconfigured plugins #83

Merged
merged 5 commits into from
Sep 16, 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
7 changes: 7 additions & 0 deletions .changeset/kind-avocados-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'magefront-plugin-stylus': minor
'magefront-plugin-babel': minor
'magefront-plugin-less': minor
---

Move 3rd party types into dev deps
5 changes: 5 additions & 0 deletions .changeset/silly-wombats-play.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'magefront-preset-default': minor
---

Remove pre-configured plugins
4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
package.json
node_modules
docs
pnpm-lock.yaml
.github
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ The `magefront.config.js` file should be located in the root directory of your p
```js
// magefront.config.js
export default {
presets: [
'magefront-preset-default'
]
presets: ['magefront-preset-default'],
}
```

Expand Down
45 changes: 45 additions & 0 deletions docs/examples/tailwindcss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Tailwind CSS

The following example uses [Tailwind CSS](https://tailwindcss.com/) to generate a CSS file.

Install these packages, and initialize Tailwind CSS configuration:

```sh
npm i magefront-plugin-postcss tailwindcss autoprefixer --save-dev
npx tailwindcss init -p
```

Add the following to your `magefront.config.js` file:

```js
// magefront.config.js
import postcss from 'magefront-plugin-postcss'
import tailwindcss from 'tailwindcss'

export default {
plugins: [
postcss({
src: 'tailwind.postcss',
dest: 'tailwind.css',
plugins: [tailwindcss()]
})
]
}
```

Add the following to your `tailwind.postcss` file:

```css
@tailwind base;
@tailwind components;
@tailwind utilities;
```

Add the paths to all your templates in your `tailwind.config.js` file:

```js
/** @type {import('tailwindcss').Config} */
export default {
content: ['./**/*.{html,phtml}']
};
```
39 changes: 0 additions & 39 deletions docs/plugins/cssnano.md

This file was deleted.

36 changes: 0 additions & 36 deletions docs/plugins/react.md

This file was deleted.

48 changes: 0 additions & 48 deletions docs/plugins/tailwindcss.md

This file was deleted.

13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"name": "magefront-monorepo",
"private": true,
"type": "module",
"author": "Emmanuel Vodor <manu@paca.happy-dev.fr>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/ubermanu/magefront.git"
},
"license": "MIT",
"author": "Emmanuel Vodor <manu@paca.happy-dev.fr>",
"type": "module",
"scripts": {
"build": "pnpm -r build",
"changeset": "changeset",
"changeset:publish": "pnpm run build && changeset publish",
"ts-check": "tsc --noEmit",
"build": "pnpm -r build",
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --runInBand"
"format": "prettier --write .",
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --runInBand",
"ts-check": "tsc --noEmit"
},
"devDependencies": {
"@changesets/cli": "^2.26.2",
Expand Down
34 changes: 17 additions & 17 deletions packages/magefront/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "magefront",
"version": "1.2.1",
"type": "module",
"description": "A modern Magento 2 theme builder",
"keywords": [
"magefront",
Expand All @@ -13,20 +12,31 @@
"sass",
"stylus"
],
"author": "Emmanuel Vodor <manu@paca.happy-dev.fr>",
"license": "MIT",
"files": [
"dist",
"types"
],
"repository": {
"type": "git",
"url": "git+https://github.com/ubermanu/magefront.git",
"directory": "packages/magefront"
},
"license": "MIT",
"author": "Emmanuel Vodor <manu@paca.happy-dev.fr>",
"type": "module",
"exports": {
".": {
"import": "./dist/magefront.mjs",
"require": "./dist/magefront.cjs",
"types": "./types/magefront.d.ts"
}
},
"main": "dist/magefront.cjs",
"module": "dist/magefront.mjs",
"types": "types/magefront.d.ts",
"bin": {
"magefront": "dist/cli.mjs"
},
"files": [
"dist",
"types"
],
"scripts": {
"build": "unbuild"
},
Expand All @@ -52,15 +62,5 @@
},
"engines": {
"node": ">=18"
},
"bin": {
"magefront": "dist/cli.mjs"
},
"exports": {
".": {
"import": "./dist/magefront.mjs",
"require": "./dist/magefront.cjs",
"types": "./types/magefront.d.ts"
}
}
}
4 changes: 1 addition & 3 deletions packages/plugin-babel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ Transpile JS files with [Babel](https://babeljs.io/).
import babel from 'magefront-plugin-babel'

export default {
plugins: [
babel({ src: 'js/source/**/*.js' })
]
plugins: [babel({ src: 'js/source/**/*.js' })],
}
```

Expand Down
24 changes: 13 additions & 11 deletions packages/plugin-babel/package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
{
"name": "magefront-plugin-babel",
"version": "1.2.1",
"type": "module",
"keywords": [
"magefront",
"magento",
"theme",
"plugin"
],
"author": "Emmanuel Vodor <manu@paca.happy-dev.fr>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/ubermanu/magefront.git",
"directory": "packages/plugin-babel"
},
"license": "MIT",
"author": "Emmanuel Vodor <manu@paca.happy-dev.fr>",
"type": "module",
"exports": {
".": {
"import": "./dist/plugin.mjs",
"require": "./dist/plugin.cjs",
"types": "./dist/plugin.d.ts"
}
},
"main": "dist/plugin.cjs",
"module": "dist/plugin.mjs",
"types": "dist/plugin.d.ts",
Expand All @@ -26,17 +33,12 @@
},
"dependencies": {
"@babel/core": "~7.22.17",
"@types/babel__core": "~7.20.1",
"fast-glob": "^3.3.1"
},
"devDependencies": {
"@types/babel__core": "~7.20.1"
},
"peerDependencies": {
"magefront": "workspace:^"
},
"exports": {
".": {
"import": "./dist/plugin.mjs",
"require": "./dist/plugin.cjs",
"types": "./dist/plugin.d.ts"
}
}
}
4 changes: 1 addition & 3 deletions packages/plugin-concat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ Merge files into one.
import concat from 'magefront-plugin-concat'

export default {
plugins: [
concat({ src: '**/*.css', dest: 'css/all-styles.css' }),
]
plugins: [concat({ src: '**/*.css', dest: 'css/all-styles.css' })],
}
```

Expand Down
Loading