Skip to content

Commit

Permalink
Use yarn workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
charrondev committed Jun 13, 2019
1 parent a070735 commit 329d4a1
Show file tree
Hide file tree
Showing 12 changed files with 4,300 additions and 518 deletions.
2 changes: 1 addition & 1 deletion applications/dashboard/package.json
@@ -1,6 +1,6 @@
{
"name": "@vanilla/dashboard",
"version": "3.0",
"version": "3.0.0",
"private": true,
"devDependencies": {
"bower": "1.8.8",
Expand Down
2 changes: 1 addition & 1 deletion applications/vanilla/package.json
@@ -1,6 +1,6 @@
{
"name": "@vanilla/forum",
"version": "3.0",
"version": "3.0.0",
"private": true,
"dependencies": {
"@vanilla/utils": "*"
Expand Down
2 changes: 1 addition & 1 deletion build/scripts/configs/makeBaseConfig.ts
Expand Up @@ -65,7 +65,7 @@ ${chalk.green(aliases)}`;
{
loader: "babel-loader",
options: {
presets: [require.resolve("@vanillaforums/babel-preset")],
presets: [require.resolve("@vanilla/babel-preset")],
plugins: babelPlugins,
cacheDirectory: true,
},
Expand Down
1 change: 1 addition & 0 deletions lerna.json
Expand Up @@ -2,5 +2,6 @@
"packages": ["packages/*", "library", "applications/dashboard", "applications/vanilla", "plugins/*"],
"version": "3.0.0",
"npmClient": "yarn",
"useWorkspaces": true,
"npmClientArgs": ["--pure-lockfile"]
}
2 changes: 1 addition & 1 deletion library/src/scripts/layout/pageHeadingContext.tsx
Expand Up @@ -4,7 +4,7 @@
*/

import React, { createRef, useContext, useEffect, useState } from "react";
import { logWarning } from "@library/utility/utils";
import { logWarning } from "@vanilla/utils";

type FontSizeSetter = (fontSize: number | null) => void;

Expand Down
11 changes: 9 additions & 2 deletions package.json
Expand Up @@ -3,6 +3,15 @@
"description": "Vanilla is a powerfully simple discussion forum you can easily customize to make as unique as your community.",
"license": "GPL-2.0-only",
"private": true,
"workspaces": {
"packages": [
"packages/*",
"library",
"applications/dashboard",
"applications/vanilla",
"plugins/*"
]
},
"dependencies": {
"@babel/polyfill": "7.4.0",
"@webcomponents/webcomponentsjs": "2.2.7",
Expand Down Expand Up @@ -152,8 +161,6 @@
"yargs": "13.2.2"
},
"resolutions": {
"@types/react": "16.7.20",
"@types/react-dom": "16.0.11",
"js-yaml": ">=3.13.1",
"tar": ">=4.4.2"
},
Expand Down
25 changes: 16 additions & 9 deletions packages/vanilla-babel-preset/index.js
Expand Up @@ -8,28 +8,35 @@ const { resolve } = require;
const envOptions = {
useBuiltIns: false,
modules: false,
}
};

const runtimePlugins =
process.env.NODE_ENV === "test"
? []
: [
[
resolve("@babel/plugin-transform-runtime"),
{
useESModules: true,
},
],
];

if (
process.env.NODE_ENV = "production" ||
process.env.DEV_COMPAT === "compat"
) {
if ((process.env.NODE_ENV = "production" || process.env.DEV_COMPAT === "compat")) {
envOptions.targets = "ie > 10, last 4 versions";
}

const preset = {
presets: [
[
resolve("@babel/preset-env"),
envOptions,
],
[resolve("@babel/preset-env"), envOptions],
resolve("@babel/preset-react"),
resolve("@babel/preset-typescript"),
],
plugins: [
resolve("@babel/plugin-proposal-class-properties"),
resolve("@babel/plugin-proposal-object-rest-spread"),
resolve("@babel/plugin-syntax-dynamic-import"),
...runtimePlugins,
],
};

Expand Down
24 changes: 19 additions & 5 deletions packages/vanilla-babel-preset/package.json
Expand Up @@ -7,13 +7,27 @@
"author": "Adam Charron <adam@charrondev.com>",
"license": "MIT",
"dependencies": {
"@babel/core": "^7.4.0",
"@babel/plugin-proposal-class-properties": "^7.4.0",
"@babel/plugin-proposal-object-rest-spread": "^7.4.0",
"@babel/core": "^7.4.5",
"@babel/plugin-proposal-class-properties": "^7.4.4",
"@babel/plugin-proposal-object-rest-spread": "^7.4.4",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/preset-env": "^7.4.2",
"@babel/plugin-transform-runtime": "7.4.4",
"@babel/polyfill": "7.4.4",
"@babel/preset-env": "^7.4.5",
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.3.3",
"@babel/runtime": "^7.4.2"
"@babel/runtime": "^7.4.5",
"@webcomponents/webcomponentsjs": "2.2.10"
},
"devDependencies": {
"@babel/core": "7.4.5",
"babel-loader": "8.0.6",
"prettier": "1.17.1",
"terser-webpack-plugin": "1.3.0",
"typescript": "3.4.5",
"typescript-tslint-plugin": "0.4.0",
"webpack": "4.32.2",
"webpack-dev-server": "3.4.1",
"yargs": "13.2.4"
}
}
1 change: 1 addition & 0 deletions plugins/editor/package.json
@@ -1,5 +1,6 @@
{
"name": "advanced-editor",
"version": "3.0.0",
"private": true,
"devDependencies": {
"fibers": "4.0.1",
Expand Down
9 changes: 7 additions & 2 deletions plugins/rich-editor/package.json
@@ -1,7 +1,12 @@
{
"name": "@vanilla/plugin-rich-editor",
"version": "3.0",
"name": "@vanilla/addon-rich-editor",
"version": "3.0.0",
"private": true,
"workspaces": {
"nohoist": [
"**"
]
},
"dependencies": {
"quill": "https://github.com/vanilla/quill.git#1.3.7",
"@vanilla/utils": "*"
Expand Down
2 changes: 1 addition & 1 deletion plugins/swagger-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "@vanilla/plugin-swagger-ui",
"version": "3.0",
"version": "3.0.0",
"private": true,
"license": "GPL-2.0",
"dependencies": {
Expand Down

0 comments on commit 329d4a1

Please sign in to comment.