Skip to content

Commit

Permalink
v0.0.25
Browse files Browse the repository at this point in the history
  • Loading branch information
vanvianen committed Jan 4, 2024
1 parent 64b97f2 commit 4010ee4
Show file tree
Hide file tree
Showing 49 changed files with 660 additions and 1,960 deletions.
2 changes: 1 addition & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# icon.gl Authors
# pack.gl Authors

========================================

Expand Down
6 changes: 3 additions & 3 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
cff-version: 1.2.0
title: icon.gl
title: pack.gl
version: 0.0.0
date-released: 2023-01-01
url: "https://github.com/scape-agency/icon.gl"
url: "https://github.com/scape-agency/pack.gl"
message: >-
If you use icon.gl, please cite it using
If you use pack.gl, please cite it using
the metadata from this file.
type: software
authors:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBITORS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributors

This project exists thanks to all the people who contribute.
This project exists thanks to all the people who contribute.

## Core Contributors

Expand Down
372 changes: 201 additions & 171 deletions LICENSE

Large diffs are not rendered by default.

201 changes: 0 additions & 201 deletions LICENSE-CODE

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
---

<div>
<img align="right" src="https://raw.githubusercontent.com/scape-agency/brand/master/src/logo/pack.gl.png" width="96" alt="Scape Agency Logo">
<img align="right" src="https://raw.githubusercontent.com/scape-agency/brand/master/src/logo/pack.gl.png" width="96" alt="pack.gl logo">
<h1 align="left">pack.gl</h1>
<h3 align="left">Package Builder</h3>
</div>

---

<img align="right" width="50%" src="/res/pack.gl.png" alt="pack.gl">
<img align="right" width="50%" src="https://raw.githubusercontent.com/scape-agency/pack.gl/main/res/pack.gl.png" alt="pack.gl cover">

### Contents

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.24
0.0.25
22 changes: 21 additions & 1 deletion dist/js/class/NpmCommandRunner.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
"use strict";
// TypeScript Class to Run NPM Commands
// class/NpmCommandRunner.ts
Object.defineProperty(exports, "__esModule", { value: true });
// Copyright 2023 Scape Agency BV
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ============================================================================
// Import
// ============================================================================
var child_process_1 = require("child_process");
// ============================================================================
// Classes
// ============================================================================
/// TypeScript Class to Run NPM Commands
class NpmCommandRunner {
/**
* Executes an npm command.
Expand All @@ -24,4 +41,7 @@ class NpmCommandRunner {
});
}
}
// ============================================================================
// Export
// ============================================================================
exports.default = NpmCommandRunner;
6 changes: 4 additions & 2 deletions dist/js/class/PackageCreator.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
// ============================================================================
var promises_1 = __importDefault(require("fs/promises"));
var path_1 = __importDefault(require("path"));
// import { PackageJson } from '../interface/PackageJson.js';
var package_config_js_1 = __importDefault(require("../config/package.config.js"));
// ============================================================================
// Classes
Expand All @@ -45,9 +44,12 @@ class PackageCreator {
version: customConfig.version,
description: customConfig.description,
keywords: customConfig.keywords,
author: customConfig.author,
contributors: customConfig.contributors,
license: customConfig.license,
homepage: customConfig.homepage,
// main: 'index.js',
repository: customConfig.repository,
funding: customConfig.funding,
dependencies: customConfig.dependencies
};
this.config = {
Expand Down
5 changes: 5 additions & 0 deletions dist/js/class/StyleProcessor.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ declare class StyleProcessor {
* @returns Processed CSS string.
*/
processPostCSS(css: string, styleOption: 'expanded' | 'compressed'): Promise<postcss.Result<postcss.Root>>;
/**
* Ensures that the given directory exists. Creates it if it does not exist.
* @param dirPath - The path of the directory to check and create.
*/
private ensureDirectoryExists;
/**
* Compiles SCSS to CSS and processes it using PostCSS.
* @param inputFile Path to the input SCSS file.
Expand Down
19 changes: 19 additions & 0 deletions dist/js/class/StyleProcessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
var sass = __importStar(require("sass"));
var postcss_1 = __importDefault(require("postcss"));
var fs_1 = __importDefault(require("fs"));
var fs_2 = require("fs");
var path_1 = __importDefault(require("path"));
var postcss_config_expanded_js_1 = __importDefault(require("../config/postcss.config.expanded.js"));
var postcss_config_compressed_js_1 = __importDefault(require("../config/postcss.config.compressed.js"));
// ============================================================================
Expand All @@ -63,6 +65,20 @@ class StyleProcessor {
const config = styleOption === 'expanded' ? postcss_config_expanded_js_1.default : postcss_config_compressed_js_1.default;
return (0, postcss_1.default)(config.plugins).process(css, { from: undefined, map: { inline: false } });
}
/**
* Ensures that the given directory exists. Creates it if it does not exist.
* @param dirPath - The path of the directory to check and create.
*/
async ensureDirectoryExists(dirPath) {
try {
await fs_2.promises.mkdir(dirPath, { recursive: true });
}
catch (error) {
if (error.code !== 'EEXIST') {
throw error;
}
}
}
/**
* Compiles SCSS to CSS and processes it using PostCSS.
* @param inputFile Path to the input SCSS file.
Expand All @@ -71,6 +87,9 @@ class StyleProcessor {
*/
async processStyles(inputFile, outputFile, styleOption) {
try {
// Ensure the output directory exists
const outputDir = path_1.default.dirname(outputFile);
await this.ensureDirectoryExists(outputDir);
// Compile SCSS to CSS
const result = await sass.compileAsync(inputFile, { style: styleOption });
// Process the compiled CSS with PostCSS and Autoprefixer
Expand Down
24 changes: 20 additions & 4 deletions dist/js/class/StylizedLogger.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
"use strict";
// class/StylizedLogger.ts
Object.defineProperty(exports, "__esModule", { value: true });
// Copyright 2023 Scape Agency BV
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ============================================================================
// Import
// ============================================================================
// ============================================================================
// Classes
// ============================================================================
class StylizedLogger {
constructor() {
this.styles = {
Expand Down Expand Up @@ -39,8 +56,7 @@ class StylizedLogger {
this.log(message, 'black', 'white');
}
}
// ============================================================================
// Export
// ============================================================================
exports.default = StylizedLogger;
// import StylizedLogger from './StylizedLogger.js';
// const logger = new StylizedLogger();
// logger.log('This is a red message with green background', 'red', 'green');
// logger.log('This is a bright blue message', 'blue');
Loading

0 comments on commit 4010ee4

Please sign in to comment.