DEV: Move pretty-text into an ember-addon format (#9689)

This commit is contained in:
Robin Ward 2020-05-07 12:37:47 -04:00 committed by GitHub
parent 781e3f5e10
commit 79c64eaeff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
43 changed files with 10681 additions and 34 deletions

View File

@ -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

View File

@ -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

View 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"
}
}
}
]
};
};

View File

@ -0,0 +1,5 @@
"use strict";
module.exports = function(/* environment, appConfig */) {
return {};
};

View 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();
};

View File

@ -0,0 +1,5 @@
"use strict";
module.exports = {
name: require("./package").name
};

View 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"
}
}

File diff suppressed because it is too large Load Diff