mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 20:54:31 +08:00
DEV: Move pretty-text into an ember-addon format (#9689)
This commit is contained in:
parent
781e3f5e10
commit
79c64eaeff
|
@ -1,20 +1,20 @@
|
||||||
//= require markdown-it.js
|
//= require markdown-it.js
|
||||||
//= require ./pretty-text/engines/discourse-markdown/helpers
|
//= require ./pretty-text/addon/engines/discourse-markdown/helpers
|
||||||
//= require ./pretty-text/engines/discourse-markdown/mentions
|
//= require ./pretty-text/addon/engines/discourse-markdown/mentions
|
||||||
//= require ./pretty-text/engines/discourse-markdown/quotes
|
//= require ./pretty-text/addon/engines/discourse-markdown/quotes
|
||||||
//= require ./pretty-text/engines/discourse-markdown/emoji
|
//= require ./pretty-text/addon/engines/discourse-markdown/emoji
|
||||||
//= require ./pretty-text/engines/discourse-markdown/onebox
|
//= require ./pretty-text/addon/engines/discourse-markdown/onebox
|
||||||
//= require ./pretty-text/engines/discourse-markdown/bbcode-block
|
//= require ./pretty-text/addon/engines/discourse-markdown/bbcode-block
|
||||||
//= require ./pretty-text/engines/discourse-markdown/bbcode-inline
|
//= require ./pretty-text/addon/engines/discourse-markdown/bbcode-inline
|
||||||
//= require ./pretty-text/engines/discourse-markdown/code
|
//= require ./pretty-text/addon/engines/discourse-markdown/code
|
||||||
//= require ./pretty-text/engines/discourse-markdown/category-hashtag
|
//= require ./pretty-text/addon/engines/discourse-markdown/category-hashtag
|
||||||
//= require ./pretty-text/engines/discourse-markdown/censored
|
//= require ./pretty-text/addon/engines/discourse-markdown/censored
|
||||||
//= require ./pretty-text/engines/discourse-markdown/table
|
//= require ./pretty-text/addon/engines/discourse-markdown/table
|
||||||
//= require ./pretty-text/engines/discourse-markdown/paragraph
|
//= require ./pretty-text/addon/engines/discourse-markdown/paragraph
|
||||||
//= require ./pretty-text/engines/discourse-markdown/newline
|
//= require ./pretty-text/addon/engines/discourse-markdown/newline
|
||||||
//= require ./pretty-text/engines/discourse-markdown/html-img
|
//= require ./pretty-text/addon/engines/discourse-markdown/html-img
|
||||||
//= require ./pretty-text/engines/discourse-markdown/text-post-process
|
//= require ./pretty-text/addon/engines/discourse-markdown/text-post-process
|
||||||
//= require ./pretty-text/engines/discourse-markdown/upload-protocol
|
//= require ./pretty-text/addon/engines/discourse-markdown/upload-protocol
|
||||||
//= require ./pretty-text/engines/discourse-markdown/inject-line-number
|
//= require ./pretty-text/addon/engines/discourse-markdown/inject-line-number
|
||||||
//= require ./pretty-text/engines/discourse-markdown/resize-controls
|
//= require ./pretty-text/addon/engines/discourse-markdown/resize-controls
|
||||||
//= require ./pretty-text/engines/discourse-markdown/d-wrap
|
//= require ./pretty-text/addon/engines/discourse-markdown/d-wrap
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
//= require ./pretty-text/pretty-text
|
//= require ./pretty-text/addon/pretty-text
|
||||||
//= require ./pretty-text/guid
|
//= require ./pretty-text/addon/guid
|
||||||
//= require ./pretty-text/censored-words
|
//= require ./pretty-text/addon/censored-words
|
||||||
//= require ./pretty-text/emoji/data
|
//= require ./pretty-text/addon/emoji/data
|
||||||
//= require ./pretty-text/emoji/version
|
//= require ./pretty-text/addon/emoji/version
|
||||||
//= require ./pretty-text/emoji
|
//= require ./pretty-text/addon/emoji
|
||||||
//= require ./pretty-text/engines/discourse-markdown-it
|
//= require ./pretty-text/addon/engines/discourse-markdown-it
|
||||||
//= require xss.min
|
//= require xss.min
|
||||||
//= require ./pretty-text/xss
|
//= require ./pretty-text/addon/xss
|
||||||
//= require ./pretty-text/white-lister
|
//= require ./pretty-text/addon/white-lister
|
||||||
//= require ./pretty-text/sanitizer
|
//= require ./pretty-text/addon/sanitizer
|
||||||
//= require ./pretty-text/oneboxer
|
//= require ./pretty-text/addon/oneboxer
|
||||||
//= require ./pretty-text/oneboxer-cache
|
//= require ./pretty-text/addon/oneboxer-cache
|
||||||
//= require ./pretty-text/context/inline-onebox-css-classes
|
//= require ./pretty-text/addon/context/inline-onebox-css-classes
|
||||||
//= require ./pretty-text/inline-oneboxer
|
//= require ./pretty-text/addon/inline-oneboxer
|
||||||
//= require ./pretty-text/upload-short-url
|
//= require ./pretty-text/addon/upload-short-url
|
||||||
|
|
0
app/assets/javascripts/pretty-text/app/.gitkeep
Normal file
0
app/assets/javascripts/pretty-text/app/.gitkeep
Normal file
89
app/assets/javascripts/pretty-text/config/ember-try.js
Normal file
89
app/assets/javascripts/pretty-text/config/ember-try.js
Normal file
|
@ -0,0 +1,89 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
const getChannelURL = require("ember-source-channel-url");
|
||||||
|
|
||||||
|
module.exports = async function() {
|
||||||
|
return {
|
||||||
|
useYarn: true,
|
||||||
|
scenarios: [
|
||||||
|
{
|
||||||
|
name: "ember-lts-3.8",
|
||||||
|
npm: {
|
||||||
|
devDependencies: {
|
||||||
|
"ember-source": "~3.8.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "ember-lts-3.12",
|
||||||
|
npm: {
|
||||||
|
devDependencies: {
|
||||||
|
"ember-source": "~3.12.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "ember-release",
|
||||||
|
npm: {
|
||||||
|
devDependencies: {
|
||||||
|
"ember-source": await getChannelURL("release")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "ember-beta",
|
||||||
|
npm: {
|
||||||
|
devDependencies: {
|
||||||
|
"ember-source": await getChannelURL("beta")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "ember-canary",
|
||||||
|
npm: {
|
||||||
|
devDependencies: {
|
||||||
|
"ember-source": await getChannelURL("canary")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// The default `.travis.yml` runs this scenario via `yarn test`,
|
||||||
|
// not via `ember try`. It's still included here so that running
|
||||||
|
// `ember try:each` manually or from a customized CI config will run it
|
||||||
|
// along with all the other scenarios.
|
||||||
|
{
|
||||||
|
name: "ember-default",
|
||||||
|
npm: {
|
||||||
|
devDependencies: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "ember-default-with-jquery",
|
||||||
|
env: {
|
||||||
|
EMBER_OPTIONAL_FEATURES: JSON.stringify({
|
||||||
|
"jquery-integration": true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
npm: {
|
||||||
|
devDependencies: {
|
||||||
|
"@ember/jquery": "^0.5.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "ember-classic",
|
||||||
|
env: {
|
||||||
|
EMBER_OPTIONAL_FEATURES: JSON.stringify({
|
||||||
|
"application-template-wrapper": true,
|
||||||
|
"default-async-observers": false,
|
||||||
|
"template-only-glimmer-components": false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
npm: {
|
||||||
|
ember: {
|
||||||
|
edition: "classic"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
};
|
5
app/assets/javascripts/pretty-text/config/environment.js
Normal file
5
app/assets/javascripts/pretty-text/config/environment.js
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
module.exports = function(/* environment, appConfig */) {
|
||||||
|
return {};
|
||||||
|
};
|
9
app/assets/javascripts/pretty-text/ember-cli-build.js
Normal file
9
app/assets/javascripts/pretty-text/ember-cli-build.js
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
const EmberAddon = require("ember-cli/lib/broccoli/ember-addon");
|
||||||
|
|
||||||
|
module.exports = function(defaults) {
|
||||||
|
let app = new EmberAddon(defaults, {});
|
||||||
|
|
||||||
|
return app.toTree();
|
||||||
|
};
|
5
app/assets/javascripts/pretty-text/index.js
Normal file
5
app/assets/javascripts/pretty-text/index.js
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: require("./package").name
|
||||||
|
};
|
54
app/assets/javascripts/pretty-text/package.json
Normal file
54
app/assets/javascripts/pretty-text/package.json
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
{
|
||||||
|
"name": "pretty-text",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "Discourse's text rendering pipeline",
|
||||||
|
"author": "Discourse",
|
||||||
|
"license": "GPLv2",
|
||||||
|
"keywords": [
|
||||||
|
"ember-addon"
|
||||||
|
],
|
||||||
|
"repository": "",
|
||||||
|
"license": "",
|
||||||
|
"author": "",
|
||||||
|
"scripts": {
|
||||||
|
"build": "ember build",
|
||||||
|
"lint:hbs": "ember-template-lint .",
|
||||||
|
"lint:js": "eslint .",
|
||||||
|
"start": "ember serve"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"ember-cli-babel": "^7.13.0",
|
||||||
|
"ember-cli-htmlbars": "^4.2.0",
|
||||||
|
"ember-auto-import": "^1.5.3"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@ember/optional-features": "^1.1.0",
|
||||||
|
"@glimmer/component": "^1.0.0",
|
||||||
|
"babel-eslint": "^10.0.3",
|
||||||
|
"broccoli-asset-rev": "^3.0.0",
|
||||||
|
"ember-cli": "~3.15.2",
|
||||||
|
"ember-cli-dependency-checker": "^3.2.0",
|
||||||
|
"ember-cli-eslint": "^5.1.0",
|
||||||
|
"ember-cli-inject-live-reload": "^2.0.1",
|
||||||
|
"ember-cli-sri": "^2.1.1",
|
||||||
|
"ember-cli-template-lint": "^1.0.0-beta.3",
|
||||||
|
"ember-cli-uglify": "^3.0.0",
|
||||||
|
"ember-disable-prototype-extensions": "^1.1.3",
|
||||||
|
"ember-export-application-global": "^2.0.1",
|
||||||
|
"ember-load-initializers": "^2.1.1",
|
||||||
|
"ember-maybe-import-regenerator": "^0.1.6",
|
||||||
|
"ember-resolver": "^7.0.0",
|
||||||
|
"ember-source": "~3.15.0",
|
||||||
|
"ember-source-channel-url": "^2.0.1",
|
||||||
|
"ember-try": "^1.4.0",
|
||||||
|
"eslint-plugin-ember": "^7.7.1",
|
||||||
|
"eslint-plugin-node": "^10.0.0",
|
||||||
|
"loader.js": "^4.7.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "8.* || >= 10.*"
|
||||||
|
},
|
||||||
|
"ember": {
|
||||||
|
"edition": "octane"
|
||||||
|
}
|
||||||
|
}
|
10485
app/assets/javascripts/pretty-text/yarn.lock
Normal file
10485
app/assets/javascripts/pretty-text/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user