Skip to content

Commit 2d6378a

Browse files
committed
Reorganising stuff
1 parent 1ddfdcf commit 2d6378a

File tree

6 files changed

+9
-19
lines changed

6 files changed

+9
-19
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@
2626
"test": "jest --coverage && lerna run test",
2727
"coveralls": "cat ./coverage/lcov.info | coveralls",
2828
"watch:test": "jest --watch",
29-
"pretest": "lerna run flow && yarn build",
29+
"pretest": "lerna run flow",
3030
"prettify": "prettier --write 'packages/**/*.js'",
31-
"build": "lerna run build",
3231
"bootstrap": "lerna bootstrap"
3332
},
3433
"husky": {

packages/container-query-meta-builder/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"main": "dist/bundle.cjs.js",
1212
"module": "dist/bundle.esm.js",
1313
"scripts": {
14-
"test": "yarn build && yarn size",
14+
"test": "yarn size",
1515
"build:esm": "BABEL_ENV=production rollup -c rollup/rollup.esm.js",
1616
"build:cjs": "BABEL_ENV=production rollup -c rollup/rollup.cjs.js",
1717
"build": "npm-run-all build:*",

packages/container-query/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
"main": "dist/bundle.cjs.js",
99
"module": "dist/bundle.esm.js",
1010
"scripts": {
11-
"test": "yarn build && yarn size",
11+
"test": "yarn flow && yarn size",
1212
"flow": "flow check",
13-
"prebuild": "yarn flow",
1413
"build:esm": "BABEL_ENV=production rollup -c rollup/rollup.esm.js",
1514
"build:cjs": "BABEL_ENV=production rollup -c rollup/rollup.cjs.js",
1615
"build": "npm-run-all build:*",

packages/postcss-container-query/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
"fs": false
1414
},
1515
"scripts": {
16+
"test": "yarn flow",
1617
"build": "rollup -c",
1718
"watch:build": "rollup -c --watch",
1819
"flow": "flow check",
19-
"prebuild": "yarn flow",
2020
"prepublish": "yarn build"
2121
},
2222
"devDependencies": {

packages/postcss-container-query/src/containerQuery.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ const walkRules = (root, opts, ruleHandler) => {
6363
* }} options
6464
*/
6565
function containerQuery(options = {}) {
66-
const getJSON =
67-
typeof options.getJSON !== "undefined" ? options.getJSON : saveMeta;
66+
const getJSON = options.getJSON || saveMeta;
6867
const singleContainer = options.singleContainer !== false;
6968

7069
return function(root, result) {
@@ -147,8 +146,8 @@ function containerQuery(options = {}) {
147146
const meta = !singleContainer
148147
? containers
149148
: currentContainerSelector
150-
? containers[currentContainerSelector]
151-
: {};
149+
? containers[currentContainerSelector]
150+
: {};
152151

153152
const filepath = root.source.input.file;
154153

@@ -159,14 +158,7 @@ function containerQuery(options = {}) {
159158
filepath
160159
});
161160

162-
if (typeof getJSON === "function") {
163-
getJSON(filepath, meta);
164-
}
165-
166-
// todo if option is set
167-
root.append(`
168-
:export { meta: '${JSON.stringify(meta)}' }
169-
`);
161+
getJSON(filepath, meta);
170162
};
171163
}
172164

packages/react-container-query/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"main": "dist/bundle.cjs.js",
99
"module": "dist/bundle.esm.js",
1010
"scripts": {
11-
"test": "yarn build && yarn size",
11+
"test": "yarn size",
1212
"build:esm": "rollup -c rollup/rollup.esm.js",
1313
"build:cjs": "rollup -c rollup/rollup.cjs.js",
1414
"build": "npm-run-all build:*",

0 commit comments

Comments
 (0)