DEV: Manage pretender with yarn.

This commit is contained in:
Guo Xiang Tan 2018-09-07 16:01:20 +08:00
parent 039afe0d2c
commit d788555994
5 changed files with 23 additions and 6 deletions

View File

@ -19,7 +19,7 @@
//= require locales/en //= require locales/en
//= require fake_xml_http_request //= require fake_xml_http_request
//= require route-recognizer //= require route-recognizer
//= require pretender //= require pretender/pretender
//= require ./wizard-pretender //= require ./wizard-pretender
// Trick JSHint into allow document.write // Trick JSHint into allow document.write

View File

@ -92,6 +92,7 @@ module Discourse
if Rails.env == "development" || Rails.env == "test" if Rails.env == "development" || Rails.env == "test"
config.assets.paths << "#{config.root}/test/javascripts" config.assets.paths << "#{config.root}/test/javascripts"
config.assets.paths << "#{config.root}/test/stylesheets" config.assets.paths << "#{config.root}/test/stylesheets"
config.assets.paths << "#{config.root}/node_modules"
end end
# Allows us to skip minifincation on some files # Allows us to skip minifincation on some files

View File

@ -12,6 +12,7 @@
"chrome-remote-interface": "^0.25.6", "chrome-remote-interface": "^0.25.6",
"eslint": "^4.19.1", "eslint": "^4.19.1",
"prettier": "^1.13.0", "prettier": "^1.13.0",
"puppeteer": "^1.4.0" "puppeteer": "^1.4.0",
"pretender": "^1.6"
} }
} }

View File

@ -11,7 +11,7 @@
//= require ember-qunit //= require ember-qunit
//= require fake_xml_http_request //= require fake_xml_http_request
//= require route-recognizer //= require route-recognizer
//= require pretender //= require pretender/pretender
//= require discourse-loader //= require discourse-loader
//= require preload-store //= require preload-store

View File

@ -466,6 +466,10 @@ extract-zip@^1.6.5:
mkdirp "0.5.0" mkdirp "0.5.0"
yauzl "2.4.1" yauzl "2.4.1"
fake-xml-http-request@^1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/fake-xml-http-request/-/fake-xml-http-request-1.6.0.tgz#bd0ac79ae3e2660098282048a12c730a6f64d550"
fast-deep-equal@^1.0.0: fast-deep-equal@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff"
@ -813,9 +817,16 @@ prelude-ls@~1.1.2:
version "1.1.2" version "1.1.2"
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
prettier@1.13.4: pretender@^1.6:
version "1.13.4" version "1.6.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.4.tgz#31bbae6990f13b1093187c731766a14036fa72e6" resolved "https://registry.yarnpkg.com/pretender/-/pretender-1.6.1.tgz#77d1e42ac8c6b298f5cd43534a87645df035db8c"
dependencies:
fake-xml-http-request "^1.6.0"
route-recognizer "^0.3.3"
prettier@^1.13.0:
version "1.14.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.14.2.tgz#0ac1c6e1a90baa22a62925f41963c841983282f9"
process-nextick-args@~1.0.6: process-nextick-args@~1.0.6:
version "1.0.7" version "1.0.7"
@ -886,6 +897,10 @@ rimraf@^2.2.8, rimraf@^2.6.1:
dependencies: dependencies:
glob "^7.0.5" glob "^7.0.5"
route-recognizer@^0.3.3:
version "0.3.4"
resolved "https://registry.yarnpkg.com/route-recognizer/-/route-recognizer-0.3.4.tgz#39ab1ffbce1c59e6d2bdca416f0932611e4f3ca3"
run-async@^2.2.0: run-async@^2.2.0:
version "2.3.0" version "2.3.0"
resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0"