package.json 4.39 KB
Newer Older
1 2 3 4 5
{
  "name": "adblockplusui",
  "private": true,
  "description": "Adblock Plus UI",
  "scripts": {
6
    "$": "npm-dollar",
7
    "dev-build": "npm run $ bundle && npm run $ dev-build",
8
    "bundle": "npm run $ bundle",
9
    "fonts-gen": "node build/font-generation/index.js",
10 11
    "lint": "npm run $ lint",
    "postinstall": "npm run bundle",
12
    "start": "http-server & npm run watch",
13 14 15 16
    "test": "npm run $ test",
    "watch": "npm run $ watch",
    "csv-export": "node build/csv-exporter/main.js -e",
    "csv-import": "node build/csv-exporter/main.js -i"
17 18
  },
  "$": {
19 20 21 22 23 24 25 26 27 28 29
    "dev-build": [
      [
        "cd ../adblockpluschrome;",
        "git pull --rebase origin $(git rev-parse --abbrev-ref HEAD);",
        "cd adblockpluscore;",
        "git pull --rebase origin $(git rev-parse --abbrev-ref HEAD);",
        "cd ../;",
        "SKIP_DEPENDENCY_UPDATES=true ./build.py devenv -t chrome;",
        "cd ../adblockplusui;"
      ]
    ],
30 31 32 33 34
    "bundle": {
      "desktop-options": {
        "css": "$ create.css desktop-options",
        "js": "$ create.js ./js/desktop-options.js ./desktop-options.js"
      },
35 36 37 38 39 40 41 42 43 44 45 46
      "first-run": {
        "css": [
          "$ create.css first-run",
          "$ create.css web"
        ],
        "js": "$ create.js ./js/first-run.js ./first-run.js"
      },
      "issue-reporter": {
        "css": "$ create.css issue-reporter",
        "js": "$ create.js ./js/issue-reporter.js ./issue-reporter.js"
      },
      "popup": "$ create.bundle popup",
47
      "test": [
48 49 50 51 52
        [
          "if [ ! -z $1 ]; then",
          " echo \"/* eslint-disable */$(browserify --node ./tests/$1.js)\">./smoke/$1.js;",
          "fi"
        ]
53
      ]
54 55
    },
    "create": {
56 57 58 59
      "bundle": {
        "css": "$ create.css $1",
        "js": "$ create.js ./js/$1.js ./$1.js"
      },
60 61
      "css": "node-sass ./css/$1.scss ./skin/$1.css",
      "js": [
62 63
        "!prod eslint ./js/**/*.js",
        "echo \"/* eslint-disable */$(browserify --node $1)\">$2"
64 65
      ],
      "test": {
66 67 68 69 70 71 72
        "component": {
          "css": "$ create.test.css $1",
          "js": [
            "$ create.test.js $1",
            "$ bundle.test $1"
          ]
        },
73 74 75 76
        "css": [
          "node-sass ./css/$1.scss ./smoke/css/$1.css",
          "cp -R ./skin ./smoke/"
        ],
77 78 79 80 81 82 83
        "js": [
          "mkdir -p smoke",
          "cp -R ./tests/{locale,background.html,$1.*} ./smoke"
        ]
      }
    },
    "lint": {
84
      "css": "stylelint ./css/*.scss ./skin/*.css --ignore-path .gitignore",
85
      "js": "eslint './*.js' './js/**/*.js' './lib/**/*.js' './ext/**/*.js' './build/**/*.js'"
86 87
    },
    "test": {
88 89
      "icons": "cp -R ./skin/icons ./smoke",
      "io-checkbox": "$ create.test.component io-checkbox",
90 91 92 93 94 95
      "io-element": {
        "js": [
          "$ create.test.js io-element",
          "$ bundle.test io-element"
        ]
      },
96
      "io-filter-search": "$ create.test.component io-filter-search",
97
      "io-filter-list": "$ create.test.component io-filter-list",
98
      "io-filter-table": "$ create.test.component io-filter-table",
99 100 101 102 103 104 105 106 107 108 109
      "io-highlighter": {
        "css": [
          "$ create.test.css io-highlighter",
          "cp -R ./skin/icons smoke/css",
          "cp ./tests/image.base64.txt ./smoke"
        ],
        "js": [
          "$ create.test.js io-highlighter",
          "$ bundle.test io-highlighter"
        ]
      },
110 111 112 113 114 115
      "io-list-box": "$ create.test.component io-list-box",
      "io-popout": "$ create.test.component io-popout",
      "io-scrollbar": "$ create.test.component io-scrollbar",
      "io-steps": "$ create.test.component io-steps",
      "io-toggle": "$ create.test.component io-toggle",
      "io-big-toggle": "$ create.test.component io-big-toggle"
116
    },
117
    "watch": {
118
      "dev-build": "watch 'npm run dev-build' ./css ./js",
119 120 121
      "bundle": "watch 'npm run bundle' ./css ./js",
      "test": "watch 'npm run test' ./css ./js"
    }
122
  },
123
  "dependencies": {
124
    "browserify": "^16.2.2",
125
    "document-register-element": "^1.11.0",
126
    "hyperhtml-element": "^3.1.0",
127
    "node-sass": "^4.9.3",
128
    "npm-dollar": "^2.1.0",
129
    "website-defaults": "github:adblockplus/website-defaults#255e4f1"
130 131
  },
  "devDependencies": {
132
    "csv": "^3.1.0",
133 134
    "eslint": "^5.4.0",
    "eslint-config-eyeo": "^2.1.0",
135
    "glob": "^7.1.2",
136
    "http-server": "^0.11.1",
137
    "local-range": "^0.1.0",
138 139 140
    "nightmare": "^3.0.1",
    "stylelint": "^9.5.0",
    "stylelint-config-eyeo": "^1.0.2",
141
    "watch": "^1.0.2"
142 143
  }
}