0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

JSONでのコメント

0
Last updated at Posted at 2016-08-07

JSONの書式にはコメントの定義が無いため、フレームワークの設定ファイルがJSONで与えられた場合、原本の値を変更後の値の隣に残したいのに、コメントにできずに悩ましい思いをすることがあると思います。今回はそんなときに使った自分なりに分かりやすい記法です。

bower.jsonでの成功例

bower.json

"scripts": {
    "postinstall": "bower install",

    "prestart": "npm install",
    "//start": "http-server -a localhost -p 8000 -c-1 ./app",
    "start": "http-server -a localhost -p 8000 -c-1 ./static",

//startで始まる行を無効にすることができました。

ちなみに、この修正の背景としては、最初にAngularJSで作成したアプリケーション(/appフォルダ)を、Spring Bootのstaticフォルダに移動したかった(+移動した後もnpm installコマンドで動かせるようにしたかった)ので、このような変更を行った次第です。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?