Skip to content

Commit

Permalink
Initial setup tooling presets packages
Browse files Browse the repository at this point in the history
  • Loading branch information
nolledgeable committed Feb 14, 2022
1 parent c801101 commit 07f0644
Show file tree
Hide file tree
Showing 15 changed files with 149,511 additions and 10 deletions.
147,216 changes: 147,216 additions & 0 deletions .yarn/releases/yarn-1.19.1.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


lastUpdateCheck 1644784526773
yarn-path ".yarn/releases/yarn-1.19.1.js"
9 changes: 9 additions & 0 deletions packages/babel-preset/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = ( api ) => {
api.cache( true );

return {
presets: [ "@wordpress/babel-preset-default" ],
plugins: [ "@babel/plugin-transform-runtime" ],
sourceType: "unambiguous",
};
};
21 changes: 21 additions & 0 deletions packages/babel-preset/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "@yoast/babel-preset",
"version": "1.0.0",
"description": "A Babel preset for Yoast packages.",
"main": "index.js",
"repository": {
"type": "git",
"url": "https://github.com/yoast/wordpress-seo",
"directory": "packages/babel-preset"
},
"author": "Team Yoast <[email protected]>",
"license": "GPL-3.0",
"private": false,
"devDependencies": {
"@babel/plugin-transform-runtime": "^7.17.0",
"@wordpress/babel-preset-default": "^6.5.1"
},
"peerDependencies": {
"@babel/core": "^7.17.2"
}
}
3 changes: 3 additions & 0 deletions packages/babel-preset/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `@yoast/babel-preset`

This package aims to provide a Babel preset for building Yoast packages.
25 changes: 25 additions & 0 deletions packages/jest-preset/jest-preset.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
moduleNameMapper: {
"\\.(scss|css)$": require.resolve(
"@wordpress/jest-preset-default/scripts/style-mock.js"
),
},
modulePaths: [ "<rootDir>" ],
setupFiles: [
require.resolve(
"@wordpress/jest-preset-default/scripts/setup-globals.js"
),
],
testMatch: [
"**/__tests__/**/*.[jt]s",
"**/test/*.[jt]s",
"**/?(*.)test.[jt]s",
],
transformIgnorePatterns: [ "/node_modules/(?!@yoast|yoastseo|lodash-es).+\\.js$" ],
testEnvironment: "jsdom",
testPathIgnorePatterns: [ "/node_modules/", "<rootDir>/vendor/" ],
timers: "fake",
transform: {
"^.+\\.[jt]sx?$": require.resolve( "babel-jest" ),
},
};
19 changes: 19 additions & 0 deletions packages/jest-preset/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "@yoast/jest-config",
"version": "1.0.0",
"description": "A Jest preset for Yoast packages.",
"main": "jest-preset.js",
"author": "Team Yoast <[email protected]>",
"license": "GPL-3.0",
"private": false,
"devDependencies": {
"@wordpress/jest-preset-default": "^8.0.1",
"babel-jest": "^27.5.1"
},
"peerDependencies": {
"@babel/core": "^7.17.2",
"jest": "^27.5.1",
"react": "^17.0.2",
"react-dom": "^17.0.2"
}
}
3 changes: 3 additions & 0 deletions packages/jest-preset/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `@yoast/jest-config`

This package aims to provide a Babel preset for building Yoast packages.
9 changes: 9 additions & 0 deletions packages/postcss-config/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* eslint-disable global-require */
module.exports = {
plugins: [
require( "postcss-import" ),
require( "tailwindcss" ),
require( "autoprefixer" ),
...( process.env.NODE_ENV === "production" ? [ require( "cssnano" ) ] : [] ),
],
};
18 changes: 18 additions & 0 deletions packages/postcss-config/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "@yoast/postcss-config",
"version": "1.0.0",
"description": "A PostCSS preset for Yoast packages.",
"main": "index.js",
"author": "Team Yoast <[email protected]>",
"license": "GPL-3.0",
"private": false,
"devDependencies": {
"autoprefixer": "^10.4.2",
"cssnano": "^5.0.17",
"postcss-import": "^14.0.2",
"tailwindcss": "^3.0.22"
},
"peerDependencies": {
"postcss": "^8.4.6"
}
}
3 changes: 3 additions & 0 deletions packages/postcss-config/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `@yoast/babel-preset`

This package aims to provide a Babel preset for building Yoast packages.
44 changes: 44 additions & 0 deletions packages/tailwindcss-preset/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
module.exports = {
prefix: "yst-",
darkMode: false,
theme: {
fontSize: {
xxs: "0.6rem",
xs: ".75rem",
sm: ".8125rem",
tiny: ".875rem",
base: "1rem",
lg: "1.125rem",
xl: "1.25rem",
"2xl": "1.5rem",
"3xl": "1.875rem",
"4xl": "2.25rem",
"5xl": "3rem",
"6xl": "4rem",
"7xl": "5rem",
},
extend: {
colors: {
primary: {
50: "#faf4f8",
100: "#f6eaf0",
200: "#e8c9da",
300: "#dba9c3",
400: "#bf6997",
500: "#a4286a",
600: "#94245f",
700: "#7b1e50",
800: "#621840",
900: "#501434",
},
},
},
},
variants: {
extend: {
backgroundColor: [ "active", "group-focus", "disabled" ],
textColor: [ "active", "group-focus", "disabled" ],
},
},
plugins: [],
};
12 changes: 12 additions & 0 deletions packages/tailwindcss-preset/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "@yoast/tailwindcss-preset",
"version": "1.0.0",
"description": "A Tailwind CSS preset for Yoast packages.",
"main": "index.js",
"author": "Team Yoast <[email protected]>",
"license": "GPL-3.0",
"private": false,
"peerDependencies": {
"tailwindcss": "^3.0.22"
}
}
3 changes: 3 additions & 0 deletions packages/tailwindcss-preset/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `@yoast/babel-preset`

This package aims to provide a Babel preset for building Yoast packages.
Loading

0 comments on commit 07f0644

Please sign in to comment.