Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
panoply committed Sep 19, 2020
0 parents commit 6882ccb
Show file tree
Hide file tree
Showing 21 changed files with 4,394 additions and 0 deletions.
174 changes: 174 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
{
"env": {
"browser": false,
"es6": true,
"jest": false,
"node": true
},
"extends": [
"standard"
],
"plugins": [
"babel"
],
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"rules": {
"no-undef": "off",
"template-curly-spacing": [
"error",
"never"
],
"no-use-before-define": [
"error",
{
"functions": false,
"classes": true,
"variables": true
}
],
"indent": [
"error",
2,
{
"MemberExpression": 1,
"SwitchCase": 1,
"ignoredNodes": [
"TemplateLiteral"
]
}
],
"implicit-arrow-linebreak": "off",
"class-methods-use-this": 0,
"camelcase": 0,
"guard-for-in": 0,
"allowElseIf": 0,
"key-spacing": [
2,
{
"singleLine": {
"beforeColon": false,
"afterColon": true
}
}
],
"function-paren-newline": [
"error",
"consistent"
],
"array-element-newline": [
"error",
"consistent"
],
"array-bracket-newline": [
"error",
"consistent"
],
"array-bracket-spacing": [
"error",
"always"
],
"comma-dangle": [
"error",
"never"
],
"comma-style": [
"error",
"last",
{
"exceptions": {
"ArrayExpression": true,
"ObjectExpression": true,
"VariableDeclaration": true
}
}
],
"one-var": [
"error",
{
"var": "always",
"let": "never",
"const": "never"
}
],
"operator-linebreak": [
"error",
"after",
{
"overrides": {
"?": "before",
":": "before"
}
}
],
"newline-per-chained-call": [
"error",
{
"ignoreChainWithDepth": 4
}
],
"object-curly-spacing": [
"error",
"always"
],
"object-curly-newline": [
"error",
{
"ObjectExpression": {
"multiline": true,
"minProperties": 7,
"consistent": true
},
"ObjectPattern": {
"multiline": true,
"minProperties": 7,
"consistent": true
},
"ImportDeclaration": {
"multiline": true,
"minProperties": 15,
"consistent": true
},
"ExportDeclaration": {
"multiline": false,
"minProperties": 10
}
}
],
"object-property-newline": [
"error",
{
"allowAllPropertiesOnSameLine": true
}
],
"padded-blocks": [
1,
{
"classes": "always"
},
{
"allowSingleLineBlocks": true
}
],
"semi": [
"error",
"never"
],
"padding-line-between-statements": [
"error",
{
"blankLine": "any",
"prev": "cjs-export",
"next": "*"
},
{
"blankLine": "any",
"prev": "if",
"next": "block-like"
}
]
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/**
5 changes: 5 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
test
versions
gif.gif
tsconfig.json
rollup.config.js
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
src/language/liquid.configuration.json
test/**
*.js
*.mjs
25 changes: 25 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
overrides: [
{
files: ['*.jsonc', '.liquidrc', '*.json'],
options: {
parser: 'json-stringify',
arrowParens: 'avoid',
bracketSpacing: true,
htmlWhitespaceSensitivity: 'css',
insertPragma: false,
jsxBracketSameLine: false,
jsxSingleQuote: false,
printWidth: 75,
proseWrap: 'preserve',
quoteProps: 'as-needed',
requirePragma: false,
semi: true,
singleQuote: false,
tabWidth: 2,
trailingComma: 'none',
useTabs: false
}
}
]
}
9 changes: 9 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
The MIT License (MIT)

Copyright © 2020 Νίκος Σαβίδης | Nikos Savvidis

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changelog

### 0.1.0 | 20/09/2020

- Initial Release
Binary file added gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
86 changes: 86 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
import rollup from "rollup";

declare const Buffer;

interface TransformReturns {
/**
* The filename including extension
*/
readonly name?: string;
/**
* The file contents, **MUST** return a `string` value, not buffer!!
*/
readonly content?: string;
/**
* Destination path replacement, returing dest will repath the destination
* of the file, ie: output will **NOT** be relative to the defined `dest` path
*/
readonly dest?: string;
}

/**
* Transform Function
*/
type Transform = (options: {
/**
* The filename
*/
readonly file: string;
/**
* The file contents server up as a Buffer!
* Return using `toString()`
*/
readonly content: Buffer<string>;
/**
* The destination path
*/
readonly dest: string;
}) => TransformReturns;

interface TransformObjectFunctions {
/**
* A glob or file to match for transformation
*/
readonly [glob: string]: string | Transform;
}

interface GlobsOptions {
/**
* Array of glob patterns to use for finding files to copy.
*/
readonly globs: string | ReadonlyArray<string>;

/**
* Directory to copy files into.
*
* @default './package'
*/
readonly dest?: string;

/**
* The current working directory
*
* @default process.cwd()
*/
readonly cwd?: string;

/**
* Whether or not to remove all files within `dest` when rollup starts up.
*
* @default true
*/
readonly clean?: string;

/**
* A function that allows for transforming of glob content.
*
* @default false
*/
readonly transform?: TransformObjectFunctions | Transform;
}

/**
* Rollup plugin to take a list of globs, copy, transform, rename or repath
* and optionally watch for changes, syncing those over.
*/
export default function globs(options: GlobsOptions): rollup.Plugin;
Loading

0 comments on commit 6882ccb

Please sign in to comment.