forked from mystiq/hydrogen-web
Convert color.js to color.mjs
This commit is contained in:
parent
c9bca52e82
commit
d5e24bf6e8
2 changed files with 3 additions and 4 deletions
|
@ -13,10 +13,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
import {offColor} from 'off-color';
|
||||||
|
|
||||||
const offColor = require("off-color").offColor;
|
export function derive(value, operation, argument, isDark) {
|
||||||
|
|
||||||
module.exports.derive = function (value, operation, argument, isDark) {
|
|
||||||
const argumentAsNumber = parseInt(argument);
|
const argumentAsNumber = parseInt(argument);
|
||||||
if (isDark) {
|
if (isDark) {
|
||||||
// For dark themes, invert the operation
|
// For dark themes, invert the operation
|
|
@ -8,8 +8,8 @@ const path = require("path");
|
||||||
const manifest = require("./package.json");
|
const manifest = require("./package.json");
|
||||||
const version = manifest.version;
|
const version = manifest.version;
|
||||||
const compiledVariables = new Map();
|
const compiledVariables = new Map();
|
||||||
const derive = require("./scripts/postcss/color").derive;
|
|
||||||
const replacer = require("./scripts/postcss/svg-colorizer").buildColorizedSVG;
|
const replacer = require("./scripts/postcss/svg-colorizer").buildColorizedSVG;
|
||||||
|
import {derive} from "./scripts/postcss/color.mjs";
|
||||||
|
|
||||||
const commonOptions = {
|
const commonOptions = {
|
||||||
logLevel: "warn",
|
logLevel: "warn",
|
||||||
|
|
Loading…
Reference in a new issue