Pack Chrome extension on server with only command-

2019-03-19 10:14发布

Is it possible to pack chrome extension with key (*.pem) on server only with CLI (Ubuntu-server)?

2条回答
女痞
2楼-- · 2019-03-19 10:58

You can use the application switches --pack-extension and --pack-extension-key as described in the documentation.

Basically, on Windows, you'd run the following in a terminal:

chrome.exe --pack-extension=c:\myext --pack-extension-key=c:\myext.pem

It works on Mac as well with:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --pack-extension=./myext --pack-extension-key=./myext.pem

It should be similar on Ubuntu.

Leaving out --pack-extension-key will automatically create a key for you.

查看更多
【Aperson】
3楼-- · 2019-03-19 11:03

There are official packaging scripts listed at https://developer.chrome.com/extensions/crx#scripts - currently one in Bash and one in Ruby. Use one of those.

查看更多
登录 后发表回答