mirror of
https://github.com/tinymce/tinymce.git
synced 2025-07-21 05:47:56 +00:00
TINY-10185: Tweak dependencies and scripts (#9251)
* TINY-10185: Tweak dependencies and scripts to better fit within the premium monorepo * TINY-10185: Rename root package to something more sensible * TINY-10185: Set more reasonable main and types properties on TinyMCE's package json * TINY-10185: Add 'build' scripts to every project * TINY-10185: Add missing inter-dependencies between modules * TINY-10185: Add type when agar is compiled standalone * TINY-10185: Don't allow dompurify to upgrade by accident * TINY-10185: Update to 6.8 release versions. Fix outdated yarn lock. * TINY-10185: Add project.json files to help with nx builds --------- Co-authored-by: Arvin Han <arvinhjt0718@gmail.com>
This commit is contained in:
@ -29,9 +29,11 @@ const oldprism = window.Prism;
|
||||
window.Prism = { manual: true };
|
||||
`;
|
||||
|
||||
const prismjs_location = path.dirname(require.resolve('prismjs'));
|
||||
|
||||
// Load in the core and any plugins/languages that should be used
|
||||
files.forEach((file) => {
|
||||
content += fs.readFileSync(path.resolve(__dirname, '../node_modules/prismjs', file)).toString() + '\n';
|
||||
content += fs.readFileSync(path.resolve(prismjs_location, file)).toString() + '\n';
|
||||
});
|
||||
|
||||
// Restore the original reference and expose prism as an ES6 module
|
||||
@ -42,4 +44,4 @@ return Prism;
|
||||
export default prismjs;`
|
||||
|
||||
// Write the new prism.js file
|
||||
fs.writeFileSync(path.resolve(__dirname, '../node_modules/prismjs/prism.js'), content);
|
||||
fs.writeFileSync(path.resolve(prismjs_location, 'prism.js'), content);
|
||||
|
@ -31,6 +31,7 @@
|
||||
"types": "./lib/main/ts/ephox/acid/api/Main.d.ts",
|
||||
"scripts": {
|
||||
"prepublishOnly": "tsc -b",
|
||||
"build": "tsc",
|
||||
"lint": "eslint --config ../../.eslintrc.json src/**/*.ts",
|
||||
"test": "bedrock-auto -b chrome-headless -d src/test/ts",
|
||||
"test-manual": "bedrock -d src/test/ts"
|
||||
|
@ -9,6 +9,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"prepublishOnly": "tsc -b",
|
||||
"build": "tsc",
|
||||
"test": "bedrock-auto -b chrome-headless -d src/test/ts",
|
||||
"test-manual": "bedrock --testdirs src/test/ts/browser src/test/ts/atomic",
|
||||
"lint": "eslint --config ../../.eslintrc.json src/**/*.ts"
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Assert, TestError, TestLabel } from '@ephox/bedrock-client';
|
||||
import { Testable } from '@ephox/dispute';
|
||||
import { Obj, Optional } from '@ephox/katamari';
|
||||
import { Compare, SugarElement, Truncate } from '@ephox/sugar';
|
||||
|
||||
@ -64,8 +65,7 @@ const assertPresence = (label: TestLabel, expected: Record<string, number>, cont
|
||||
Assert.eq(TestLabel.concat('Did not find ' + num + ' of ' + selector + ', found: ' + actual + '. Test: ', label), num, actual);
|
||||
});
|
||||
};
|
||||
|
||||
const assertEq = Assert.eq;
|
||||
const assertEq: <T>(message: TestLabel, expected: T, actual: T, tt?: Testable.Testable<T>) => void = Assert.eq;
|
||||
|
||||
const assertDomEq = (label: TestLabel, expected: SugarElement<Node>, actual: SugarElement<Node>): void => {
|
||||
Assert.eq(
|
||||
|
@ -25,7 +25,8 @@
|
||||
"test-manual": "bedrock --testdirs src/test/ts/atomic src/test/ts/browser src/test/ts/webdriver",
|
||||
"lint": "eslint --config ../../.eslintrc.json src/**/*.ts",
|
||||
"start": "grunt dev",
|
||||
"prepublishOnly": "tsc -b"
|
||||
"prepublishOnly": "tsc -b",
|
||||
"build": "tsc"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -27,6 +27,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"prepublishOnly": "tsc -b",
|
||||
"build": "tsc",
|
||||
"test": "bedrock-auto -b chrome-headless -d src/test/ts",
|
||||
"test-manual": "bedrock -d src/test/ts",
|
||||
"lint": "eslint --config ../../.eslintrc.json src/**/*.ts"
|
||||
|
@ -6,13 +6,15 @@
|
||||
"@ephox/katamari": "^9.1.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ephox/agar": "^8.0.0",
|
||||
"@ephox/katamari-assertions": "^4.0.9"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "bedrock-auto -b chrome-headless -d src/test/ts",
|
||||
"test-manual": "bedrock -d src/test/ts",
|
||||
"lint": "eslint --config ../../.eslintrc.json src/**/*.ts",
|
||||
"prepublishOnly": "tsc -b"
|
||||
"prepublishOnly": "tsc -b",
|
||||
"build": "tsc"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -10,6 +10,7 @@
|
||||
"scripts": {
|
||||
"test": "echo \"No tests here\"",
|
||||
"prepublishOnly": "tsc -b",
|
||||
"build": "tsc",
|
||||
"lint": "eslint --config ../../.eslintrc.json src/**/*.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -34,6 +34,7 @@
|
||||
"scripts": {
|
||||
"test": "tsc -b",
|
||||
"lint": "eslint --config ../../.eslintrc.json src/**/*.ts",
|
||||
"prepublishOnly": "tsc -b"
|
||||
"prepublishOnly": "tsc -b",
|
||||
"build": "tsc"
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,8 @@
|
||||
"test": "bedrock-auto -b chrome-headless -d src/test",
|
||||
"test-manual": "bedrock -d src/test",
|
||||
"lint": "eslint --config ../../.eslintrc.json src/**/*.ts",
|
||||
"prepublishOnly": "tsc -b"
|
||||
"prepublishOnly": "tsc -b",
|
||||
"build": "tsc"
|
||||
},
|
||||
"author": "Ephox Corporation DBA Tiny Technologies, Inc",
|
||||
"license": "MIT",
|
||||
|
@ -9,6 +9,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"prepublishOnly": "tsc -b",
|
||||
"build": "tsc",
|
||||
"test": "bedrock-auto -b chrome-headless -d src/test/ts",
|
||||
"test-manual": "bedrock -d src/test/ts",
|
||||
"lint": "eslint --config ../../.eslintrc.json src/**/*.ts"
|
||||
|
@ -9,6 +9,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"prepublishOnly": "tsc -b",
|
||||
"build": "tsc",
|
||||
"test": "bedrock-auto -b chrome-headless -d src/test/ts",
|
||||
"test-manual": "bedrock -d src/test/ts",
|
||||
"lint": "eslint --config ../../.eslintrc.json src/**/*.ts"
|
||||
|
@ -19,7 +19,8 @@
|
||||
"test": "bedrock-auto -b chrome-headless -d src/test/ts",
|
||||
"test-manual": "bedrock -d src/test/ts",
|
||||
"lint": "eslint --config ../../.eslintrc.json src/**/*.ts",
|
||||
"prepublishOnly": "tsc -b"
|
||||
"prepublishOnly": "tsc -b",
|
||||
"build": "tsc"
|
||||
},
|
||||
"author": "Ephox Corporation DBA Tiny Technologies, Inc",
|
||||
"license": "MIT",
|
||||
|
@ -23,5 +23,15 @@
|
||||
"LICENSE.txt"
|
||||
],
|
||||
"author": "Ephox Corporation DBA Tiny Technologies, Inc",
|
||||
"license": "MIT"
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-clean": "^0.4.0",
|
||||
"gulp-clean-css": "^4.3.0",
|
||||
"gulp-connect": "^5.7.0",
|
||||
"gulp-less": "^5.0.0",
|
||||
"gulp-rename": "^2.0.0",
|
||||
"gulp-sourcemaps": "^3.0.0",
|
||||
"gulp-stylelint": "^13.0.0"
|
||||
}
|
||||
}
|
||||
|
13
modules/oxide-icons-default/project.json
Normal file
13
modules/oxide-icons-default/project.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "@tinymce/oxide-icons-default",
|
||||
"targets": {
|
||||
"build": {
|
||||
"inputs": [
|
||||
"{projectRoot}/src/svg/*.svg"
|
||||
],
|
||||
"outputs": [
|
||||
"{projectRoot}/dist"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -35,5 +35,8 @@
|
||||
"dependencies": {
|
||||
"prism-themes": "^1.9.0",
|
||||
"prismjs": "^1.27.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"gulp": "^4.0.2"
|
||||
}
|
||||
}
|
||||
|
14
modules/oxide/project.json
Normal file
14
modules/oxide/project.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "@tinymce/oxide",
|
||||
"targets": {
|
||||
"build": {
|
||||
"inputs": [
|
||||
"{projectRoot}/src/less/**/*.less",
|
||||
"tiny-icons"
|
||||
],
|
||||
"outputs": [
|
||||
"{projectRoot}/build/skins/**"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -30,7 +30,8 @@
|
||||
"scripts": {
|
||||
"test-manual": "bedrock -d src/test",
|
||||
"lint": "eslint --config ../../.eslintrc.json src/**/*.ts",
|
||||
"prepublishOnly": "tsc -b"
|
||||
"prepublishOnly": "tsc -b",
|
||||
"build": "tsc"
|
||||
},
|
||||
"author": "Ephox Corporation DBA Tiny Technologies, Inc",
|
||||
"license": "MIT",
|
||||
|
@ -26,6 +26,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"prepublishOnly": "tsc -b",
|
||||
"build": "tsc",
|
||||
"test": "bedrock-auto -b chrome-headless -d src/test/ts",
|
||||
"test-manual": "bedrock -d src/test/ts",
|
||||
"lint": "eslint --config ../../.eslintrc.json src/**/*.ts"
|
||||
|
@ -25,7 +25,8 @@
|
||||
"test": "bedrock-auto -b chrome-headless -d src/test/ts",
|
||||
"test-manual": "bedrock -d src/test/ts",
|
||||
"lint": "eslint --config ../../.eslintrc.json src/**/*.ts",
|
||||
"prepublishOnly": "tsc -b"
|
||||
"prepublishOnly": "tsc -b",
|
||||
"build": "tsc"
|
||||
},
|
||||
"author": "Ephox Corporation DBA Tiny Technologies, Inc",
|
||||
"license": "MIT",
|
||||
|
@ -26,6 +26,7 @@
|
||||
"@ephox/sugar": "^9.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ephox/agar": "^8.0.0",
|
||||
"@ephox/katamari-assertions": "^4.0.9"
|
||||
},
|
||||
"author": "Ephox Corporation DBA Tiny Technologies, Inc",
|
||||
@ -37,6 +38,7 @@
|
||||
"test": "bedrock-auto -b chrome-headless -d src/test",
|
||||
"test-manual": "bedrock -d src/test",
|
||||
"lint": "eslint --config ../../.eslintrc.json src/**/*.ts",
|
||||
"prepublishOnly": "tsc -b"
|
||||
"prepublishOnly": "tsc -b",
|
||||
"build": "tsc"
|
||||
}
|
||||
}
|
||||
|
@ -20,6 +20,7 @@
|
||||
],
|
||||
"scripts": {
|
||||
"prepublishOnly": "tsc -b",
|
||||
"build": "tsc",
|
||||
"test": "bedrock-auto -b chrome-headless -d src/test/ts",
|
||||
"test-manual": "bedrock -d src/test/ts",
|
||||
"lint": "eslint --config ../../.eslintrc.json src/**/*.ts"
|
||||
|
@ -25,6 +25,9 @@
|
||||
"@ephox/robin": "^10.4.0",
|
||||
"@ephox/sugar": "^9.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ephox/agar": "^8.0.0"
|
||||
},
|
||||
"author": "Ephox Corporation DBA Tiny Technologies, Inc",
|
||||
"license": "MIT",
|
||||
"main": "./lib/main/ts/ephox/snooker/api/Main.js",
|
||||
@ -32,6 +35,7 @@
|
||||
"types": "./lib/main/ts/ephox/snooker/api/Main.d.ts",
|
||||
"scripts": {
|
||||
"prepublishOnly": "tsc -b",
|
||||
"build": "tsc",
|
||||
"test": "bedrock-auto -b chrome-headless -d src/test/ts",
|
||||
"test-manual": "bedrock -d src/test/ts",
|
||||
"lint": "eslint --config ../../.eslintrc.json src/**/*.ts"
|
||||
|
@ -9,6 +9,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"prepublishOnly": "tsc -b",
|
||||
"build": "tsc",
|
||||
"test": "bedrock-auto -b chrome-headless --stopOnFailure -d src/test/ts",
|
||||
"test-manual": "bedrock --stopOnFailure -d src/test/ts",
|
||||
"lint": "eslint --config ../../.eslintrc.json src/**/*.ts"
|
||||
|
@ -15,16 +15,27 @@
|
||||
"engines": {
|
||||
"node": ">=0.10.26"
|
||||
},
|
||||
"main": "tinymce.js",
|
||||
"main": "js/tinymce/tinymce.js",
|
||||
"types": "js/tinymce/tinymce.d.ts",
|
||||
"scripts": {
|
||||
"build": "grunt",
|
||||
"test": "grunt test",
|
||||
"lint": "grunt eslint",
|
||||
"silver-test": "grunt bedrock-auto:silver",
|
||||
"silver-test-manual": "grunt bedrock-manual:silver"
|
||||
},
|
||||
"dependencies": {
|
||||
"dompurify": "^3.0.5",
|
||||
"dompurify": "3.0.5",
|
||||
"prismjs": "^1.27.0",
|
||||
"tslib": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ephox/acid": "^6.0.0",
|
||||
"@ephox/agar": "^8.0.0",
|
||||
"@ephox/alloy": "^14.0.0",
|
||||
"@ephox/bridge": "^4.7.0",
|
||||
"@ephox/darwin": "^8.2.0",
|
||||
"@tinymce/oxide": "^2.7.0",
|
||||
"@tinymce/oxide-icons-default": "^2.6.0"
|
||||
}
|
||||
}
|
||||
|
31
modules/tinymce/project.json
Normal file
31
modules/tinymce/project.json
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "tinymce",
|
||||
"namedInputs": {
|
||||
"tinymce": [
|
||||
"ts-globals",
|
||||
"{projectRoot}/tsconfig.json",
|
||||
"{projectRoot}/src/**/main/**/*.ts"
|
||||
]
|
||||
},
|
||||
"targets": {
|
||||
"build": {
|
||||
"inputs": [
|
||||
"tinymce"
|
||||
],
|
||||
"outputs": [
|
||||
"{projectRoot}/dist",
|
||||
"{projectRoot}/js",
|
||||
"{projectRoot}/lib"
|
||||
]
|
||||
},
|
||||
"test": {
|
||||
"inputs": [
|
||||
"tinymce",
|
||||
"{projectRoot}/src/**/test/**/*.ts"
|
||||
],
|
||||
"dependsOn": [
|
||||
"build"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
25
package.json
25
package.json
@ -1,19 +1,18 @@
|
||||
{
|
||||
"name": "root",
|
||||
"name": "tinymce-monorepo",
|
||||
"private": true,
|
||||
"workspaces": [
|
||||
"modules/*"
|
||||
],
|
||||
"scripts": {
|
||||
"preinstall": "node -e \"if(process.env.npm_execpath.indexOf('yarn') === -1) throw new Error('You must use Yarn to install, not NPM')\"",
|
||||
"postinstall": "patch-package",
|
||||
"tinymce-grunt": "grunt --gruntfile modules/tinymce/Gruntfile.js",
|
||||
"tinymce-rollup": "run-s \"tinymce-grunt dev rollup\"",
|
||||
"oxide-icons-build": "yarn -s --cwd modules/oxide-icons-default build",
|
||||
"oxide-icons-ci": "yarn --cwd modules/oxide-icons-default ci",
|
||||
"oxide-icons-ci": "yarn -s --cwd modules/oxide-icons-default ci",
|
||||
"oxide-build": "yarn -s --cwd modules/oxide build",
|
||||
"oxide-start": "yarn -s --cwd modules/oxide start",
|
||||
"oxide-ci": "yarn --cwd modules/oxide ci",
|
||||
"oxide-ci": "yarn -s --cwd modules/oxide ci",
|
||||
"tsc": "tsc -b",
|
||||
"watch": "tsc -b -w",
|
||||
"eslint": "lerna exec --stream --no-bail -- eslint --max-warnings=0 src/**/*.ts",
|
||||
@ -27,11 +26,11 @@
|
||||
"test": "run-s local-ci",
|
||||
"build": "npm-run-all -p oxide-icons-ci oxide-ci -s tinymce-grunt",
|
||||
"prepublishOnly": "run-s oxide-icons-ci",
|
||||
"browser-test": "yarn -s grunt browser-auto",
|
||||
"browser-test-manual": "yarn -s grunt browser-manual",
|
||||
"headless-test": "yarn -s grunt headless-auto",
|
||||
"headless-test-firefox": "yarn -s grunt headless-auto --bedrock-browser=firefox-headless",
|
||||
"headless-test-manual": "yarn -s grunt headless-manual",
|
||||
"browser-test": "grunt browser-auto",
|
||||
"browser-test-manual": "grunt browser-manual",
|
||||
"headless-test": "grunt headless-auto",
|
||||
"headless-test-firefox": "grunt headless-auto --bedrock-browser=firefox-headless",
|
||||
"headless-test-manual": "grunt headless-manual",
|
||||
"bedrock": "bedrock --customRoutes modules/tinymce/src/core/test/json/routes.json",
|
||||
"test-one": "yarn tsc && yarn bedrock-auto -b chrome-headless -f"
|
||||
},
|
||||
@ -62,14 +61,6 @@
|
||||
"grunt-shell": "^4.0.0",
|
||||
"grunt-terser": "^2.0.0",
|
||||
"grunt-webpack": "^5.0.0",
|
||||
"gulp": "^4.0.0",
|
||||
"gulp-clean": "^0.4.0",
|
||||
"gulp-clean-css": "^4.0.0",
|
||||
"gulp-connect": "^5.7.0",
|
||||
"gulp-less": "^5.0.0",
|
||||
"gulp-rename": "^2.0.0",
|
||||
"gulp-sourcemaps": "^3.0.0",
|
||||
"gulp-stylelint": "^13.0.0",
|
||||
"lerna": "^3.18.4",
|
||||
"less-plugin-autoprefix": "^2.0.0",
|
||||
"load-grunt-tasks": "^5.1.0",
|
||||
|
@ -4260,7 +4260,7 @@ domhandler@^4.2.0, domhandler@^4.3.1:
|
||||
dependencies:
|
||||
domelementtype "^2.2.0"
|
||||
|
||||
dompurify@^3.0.5:
|
||||
dompurify@3.0.5:
|
||||
version "3.0.5"
|
||||
resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.0.5.tgz#eb3d9cfa10037b6e73f32c586682c4b2ab01fbed"
|
||||
integrity sha512-F9e6wPGtY+8KNMRAVfxeCOHU0/NPWMSENNq4pQctuXRqqdEPW7q3CrLbR5Nse044WwacyjHGOMlvNsBe1y6z9A==
|
||||
@ -6065,7 +6065,7 @@ grunt@^1.0.4, grunt@^1.1.0, grunt@^1.5.3:
|
||||
minimatch "~3.0.4"
|
||||
nopt "~3.0.6"
|
||||
|
||||
gulp-clean-css@^4.0.0:
|
||||
gulp-clean-css@^4.3.0:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/gulp-clean-css/-/gulp-clean-css-4.3.0.tgz#5b1e73f2fca46703eb636014cdd4553cea65146d"
|
||||
integrity sha512-mGyeT3qqFXTy61j0zOIciS4MkYziF2U594t2Vs9rUnpkEHqfu6aDITMp8xOvZcvdX61Uz3y1mVERRYmjzQF5fg==
|
||||
@ -6171,7 +6171,7 @@ gulp-stylelint@^13.0.0:
|
||||
strip-ansi "^6.0.0"
|
||||
through2 "^3.0.1"
|
||||
|
||||
gulp@^4.0.0:
|
||||
gulp@^4.0.2:
|
||||
version "4.0.2"
|
||||
resolved "https://registry.yarnpkg.com/gulp/-/gulp-4.0.2.tgz#543651070fd0f6ab0a0650c6a3e6ff5a7cb09caa"
|
||||
integrity sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA==
|
||||
|
Reference in New Issue
Block a user