New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update: ES6 Modules&Firefox version refs #372 #468
Conversation
がんばって見ます 🙄 |
cbed67d のせいでビルド通らないですね…(後で修正します) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
とりあえず、Fix: app.moduleの廃止 15a6b59
までざっと見ました。
.gitignore
Outdated
@@ -38,7 +38,7 @@ $RECYCLE.BIN/ | |||
.LSOverride | |||
|
|||
# Icon must end with two \r | |||
Icon | |||
Icon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\r
が、\r\n
か\n
になっちゃってます。
src/write/submit_res.coffee
Outdated
@@ -1,13 +1,17 @@ | |||
import Write from "./write.coffee" | |||
import WriteHistory from "../core/WriteHistory.coffee" | |||
import {tsld} from "../core/URL.ts" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
他では、getTsldとしてますがなにか意図があってのことですか?
src/write/submit_thread.coffee
Outdated
@@ -1,13 +1,16 @@ | |||
import Write from "./write.coffee" | |||
import {tsld} from "../core/URL.ts" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
他では、getTsldとしてますがなにか意図があってのことですか?
src/write/write.coffee
Outdated
# テーマ適用 | ||
$view.removeClass("theme_default", "theme_dark", "theme_none") | ||
$view.addClass("theme_#{themeId}") | ||
import {fix, parseQuery, setScheme, getScheme, tsld, guessType} from "../core/URL.ts" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
他では、fixUrlとしてますがなにか意図があってのことですか?
f7f395e
to
29bc7c5
Compare
tree shakingが効くように
29bc7c5
to
af92bb2
Compare
developの1.30.10のバージョン変更を取り込むためにrebaseかけました(これによる変更点はpackage.jsonだけです) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
コミット別にみてるのでいくつかoutdatedになっちゃってるので開いてみてくださいー 🙏
-
Chromeの/で
という文言を削除、もしくはs/Chrome/ブラウザ/g` - READMEをFirefox対応に合わせて修正
動作確認したらまたコメント書きます�ー
src/core/ChromeBookmarkEntryList.ts
Outdated
this.loadFromChromeBookmark(); | ||
}); | ||
// Firefoxではbookmarks.onImportBegan/Endedは実装されていない | ||
if (location.origin.startsWith("chrome-extension://")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これは、chromeかどうかみるんじゃなくて、Eventがあるかどうか見るのがいいかと
browser.bookmarks.onImportEnded !== void 0
とか、typeof browser.bookmarks.onImportEnded === 'Event'
とか
src/app.ts
Outdated
@@ -423,6 +423,13 @@ export function clipboardWrite (str:string):void { | |||
$textarea.remove(); | |||
} | |||
|
|||
export var imgExt: string = ( () => { | |||
if (location.origin.startsWith("chrome-extension://")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
結果は同じになるのでこれでいいと思いますが、ビルド対象に限らずwebp,pngのリソースを含めてpictureタグ使ってフォールバックさせるか、gulp-replaceとかで定数置換させちゃったほうがすっきりするかと。
.gitignore
Outdated
@@ -105,5 +105,8 @@ Session.vim | |||
|
|||
### My Project | |||
/debug/ | |||
/debug-chrome/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
対応ブラウザごとにトップディレクトリにdebug-*が増えてもあれなので、個人的にはdebug/chrome
, debug/firefox
のような構成の方がいいと思いますがどうでしょう?
packしたファイルも同じで、build/chrome/read.crx_2.1.30.10.crx
みたいな構成が好みです。
AMOでの公開にすると、審査とかしんどいと思うのでChromeと同じく署名して、 https://readcrx-2.github.io/read.crx-2/ での公開でいいかと。 この辺見る限りChromeより楽そうで、署名されてれば普通にインストールできるし、インストール後は自動更新もできそうですね。 2018/08/25 00:39 追記: 署名用にaddons.mozilla.orgのアカウント必要ですが、gmailにreadcrxのアカウント作成して、それ使って各種サービス(したらば/Slack/Github Organization/addons.mozilla.org)のアカウントを管理するというのでどうでしょう? |
af92bb2
to
5ae44b3
Compare
以下の変更をしました
|
Extensions and the add-on ID (ja) 署名用アカウントの話ですが、そうですね。gmailがよさそうですね。 |
それでいいとおもいます。 |
副次的にFirefoxでタブをクリック時にドラッグ状態になるのが直った
51ee280
to
4f4193a
Compare
以下の修正をしました
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
以下の更新をしました
|
reviewありがとうございます! |
こちらのバージョンを試してみようと、 |
@awazi ビルド環境おしえていただけますか? bash-4.4$ git checkout develop
Already on 'develop'
Your branch is up to date with 'origin/develop'.
bash-4.4$ git pull
Already up to date.
bash-4.4$ npm ci
> fsevents@1.2.4 install /Users/eru/Hack/read.crx-2/node_modules/fsevents
> node install
[fsevents] Success: "/Users/eru/Hack/read.crx-2/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
> spawn-sync@1.0.15 postinstall /Users/eru/Hack/read.crx-2/node_modules/spawn-sync
> node postinstall
> dtrace-provider@0.8.7 install /Users/eru/Hack/read.crx-2/node_modules/dtrace-provider
> node-gyp rebuild || node suppress-error.js
ACTION binding_gyp_ndtp_target_build_ndtp .
TOUCH Release/obj.target/ndtp.stamp
> sharp@0.20.5 install /Users/eru/Hack/read.crx-2/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.6.1/libvips-8.6.1-darwin-x64.tar.gz
> node-sass@4.9.3 install /Users/eru/Hack/read.crx-2/node_modules/node-sass
> node scripts/install.js
Cached binary found at /Users/eru/.npm/node-sass/4.9.3/darwin-x64-64_binding.node
> node-sass@4.9.3 postinstall /Users/eru/Hack/read.crx-2/node_modules/node-sass
> node scripts/build.js
Binary found at /Users/eru/Hack/read.crx-2/node_modules/node-sass/vendor/darwin-x64-64/binding.node
Testing binary
Binary is fine
added 1364 packages in 18.975s
bash-4.4$ npm run build
> read.crx-2@0.0.0 build /Users/eru/Hack/read.crx-2
> gulp build
[22:00:00] Requiring external module coffeescript/register
[22:00:02] Using gulpfile ~/Hack/read.crx-2/gulpfile.coffee
[22:00:02] Starting 'build'...
[22:00:02] Starting 'js:chrome'...
[22:00:02] Starting 'css:chrome'...
[22:00:02] Starting 'html:chrome'...
[22:00:02] Starting 'img:chrome'...
[22:00:02] Starting 'manifest:chrome'...
[22:00:02] Starting 'lib:chrome'...
[22:00:02] Starting 'js:app.js:chrome'...
[22:00:02] Starting 'js:app_core.js:chrome'...
[22:00:02] Starting 'js:ui.js:chrome'...
[22:00:02] Starting 'js:submit_res.js:chrome'...
[22:00:02] Starting 'js:submit_thread.js:chrome'...
[22:00:02] Starting 'js:background.js:chrome'...
[22:00:02] Starting 'js:cs_addlink.js:chrome'...
[22:00:02] Starting 'js:view:chrome'...
[22:00:02] Starting 'js:zombie.js:chrome'...
[22:00:02] Starting 'js:cs_write.js:chrome'...
[22:00:02] Starting 'css:ui.css:chrome'...
[22:00:02] Starting 'css:view:chrome'...
[22:00:02] Starting 'css:write:chrome'...
[22:00:02] Starting 'html:view:chrome'...
[22:00:02] Starting 'html:zombie.html:chrome'...
[22:00:02] Starting 'html:write:chrome'...
[22:00:02] Starting 'img:imgs:chrome'...
[22:00:02] Starting 'img:ico:chrome'...
[22:00:02] Starting 'img:logo128:chrome'...
[22:00:02] Starting 'img:loading:chrome'...
[22:00:02] Starting 'lib:shortQuery:chrome'...
[22:00:02] Starting 'lib:webExtPolyfill:chrome'...
[22:00:07] Finished 'js:app_core.js:chrome' after 5.53 s
[22:00:07] Finished 'js:app.js:chrome' after 5.53 s
[22:00:07] Finished 'js:ui.js:chrome' after 5.53 s
[22:00:07] Finished 'js:submit_res.js:chrome' after 5.53 s
[22:00:07] Finished 'js:submit_thread.js:chrome' after 5.53 s
RECOMMEND: set default_locale
RECOMMEND: false is better than undefined on persistent of background
[22:00:08] Finished 'img:loading:chrome' after 5.79 s
[22:00:08] Finished 'img:logo128:chrome' after 5.79 s
[22:00:08] Finished 'manifest:chrome' after 5.8 s
[22:00:08] Finished 'img:ico:chrome' after 5.79 s
[22:00:09] Finished 'img:imgs:chrome' after 6.58 s
[22:00:09] Finished 'img:chrome' after 6.58 s
[22:00:09] Finished 'js:cs_addlink.js:chrome' after 6.59 s
[22:00:09] Finished 'js:background.js:chrome' after 6.59 s
[22:00:09] Finished 'js:zombie.js:chrome' after 6.59 s
[22:00:09] Finished 'js:cs_write.js:chrome' after 6.59 s
[22:00:09] Finished 'lib:shortQuery:chrome' after 6.59 s
[22:00:09] Finished 'lib:webExtPolyfill:chrome' after 6.6 s
[22:00:09] Finished 'lib:chrome' after 6.6 s
[22:00:09] Finished 'html:zombie.html:chrome' after 6.63 s
[22:00:09] Finished 'html:write:chrome' after 6.9 s
[22:00:09] Finished 'css:write:chrome' after 6.92 s
[22:00:09] Finished 'css:ui.css:chrome' after 7.12 s
[22:00:09] Finished 'js:view:chrome' after 7.49 s
[22:00:09] Finished 'js:chrome' after 7.49 s
[22:00:09] Finished 'html:view:chrome' after 7.49 s
[22:00:09] Finished 'html:chrome' after 7.49 s
[22:00:10] Finished 'css:view:chrome' after 7.59 s
[22:00:10] Finished 'css:chrome' after 7.59 s
[22:00:10] Finished 'build' after 7.59 s
bash-4.4$ ls -la debug/chrome/
total 364
drwxr-xr-x 16 eru staff 544 8 31 22:00 .
drwxr-xr-x 3 eru staff 102 8 31 22:00 ..
-rw-r--r-- 1 eru staff 392 8 31 21:55 _base.html
-rw-r--r-- 1 eru staff 14682 8 31 22:00 app.js
-rw-r--r-- 1 eru staff 166855 8 31 22:00 app_core.js
-rw-r--r-- 1 eru staff 13456 8 31 21:55 background.js
-rw-r--r-- 1 eru staff 2327 8 31 21:55 cs_addlink.js
drwxr-xr-x 40 eru staff 1360 8 31 22:00 img
drwxr-xr-x 4 eru staff 136 8 31 22:00 lib
-rw-r--r-- 1 eru staff 2091 8 31 22:00 manifest.json
-rw-r--r-- 1 eru staff 3615 8 31 21:55 ui.css
-rw-r--r-- 1 eru staff 144813 8 31 22:00 ui.js
drwxr-xr-x 38 eru staff 1292 8 31 22:00 view
drwxr-xr-x 10 eru staff 340 8 31 22:00 write
-rw-r--r-- 1 eru staff 433 8 28 03:28 zombie.html
-rw-r--r-- 1 eru staff 1325 8 31 21:55 zombie.js |
OSはubuntu 16.04 LTSです。よろしくお願いします。
|
@awazi あ、5d91b59 のコミットでビルドうまく行かなくなってますね。 とりあえず手元で動作確認するだけであれば↑のコミットrevertしとけば確認できると思います。 @S--Minecraft ↑の修正おねがいしますー。 |
ありがとうございます。動きました。 |
2018/08/31 19:19 最終変更点一覧
rollup.js
の導入WebExtension browser API Polyfill
の導入auto-prefixer
の導入watch
でscss/pugのインポート元の変更も検知するようにapp.module
の廃止app.contextMenus
->app.ContextMenus
th:nth-child
->th.className
child-src
をframe-src
に変更rollup.js
の導入差分がとても大きくなってますが、実際gulp周り以外はほとんど微修正です(とは言ってもちりも積もれば山となるですが…)
よろしくお願いします
gulp周りはもう少しいじるかもしれないです、差分ビルドあたりを
それとFirefox版一応起動と多少の動作までは確認したんですが公開方法とかはどうしようかなと