-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from polkadot-ui/nik-replace-recipes-with-latest
Replace code with latest one
- Loading branch information
Showing
98 changed files
with
3,323 additions
and
1,357 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,6 @@ | ||
[![Core React - Package](https://img.shields.io/badge/Core React-Package-E6007A?logo=polkadot =E6007A)](https://github.com/polkadot-cloud/polkadot-cloud) ![ci](https://github.com/polkadot-cloud/polkadot-cloud/actions/workflows/main.yml/badge.svg) [![License](https://img.shields.io/badge/License-GPL_3.0_only-blue.svg)](https://opensource.org/license/gpl-3-0/) | ||
[![Recipes - Package](https://img.shields.io/badge/Core React-Package-E6007A?logo=polkadot =E6007A)](https://github.com/polkadot-cloud/library) ![ci](https://github.com/polkadot-cloud/library/actions/workflows/main.yml/badge.svg) [![License](https://img.shields.io/badge/License-GPL_3.0_only-blue.svg)](https://opensource.org/license/gpl-3-0/) | ||
|
||
# Polkadot Cloud: Recipes | ||
|
||
Functional React Recipes for Polkadot dapps. | ||
Example functional components derived from the Polkadot Cloud library. | ||
|
||
## Managing the Package | ||
|
||
#### Start the development server for real-time component feedback. | ||
|
||
``` | ||
yarn dev | ||
``` | ||
|
||
#### Build the package into an optimised Rollup build. | ||
|
||
``` | ||
yarn build | ||
``` | ||
|
||
#### Publish the package to NPM. | ||
|
||
``` | ||
cd dist && npm publish --access public | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Copyright 2024 @polkadot-cloud/recipes authors & contributors | ||
// SPDX-License-Identifier: GPL-3.0-only | ||
|
||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
const gulp = require("gulp"); | ||
const ts = require("gulp-typescript"); | ||
const strip = require("gulp-strip-comments"); | ||
const sourcemaps = require("gulp-sourcemaps"); | ||
const merge = require("merge-stream"); | ||
|
||
const sass = require("gulp-sass")(require("sass")); | ||
const lrserver = require("tiny-lr")(); | ||
const refresh = require("gulp-livereload"); | ||
const SASS_OPTIONS = { outputStyle: "compressed" }; | ||
const replace = require("gulp-replace"); | ||
|
||
const { src, dest, series } = gulp; | ||
|
||
const buildComponents = () => { | ||
var tsProject = ts.createProject("tsconfig.json"); | ||
var tsResult = tsProject.src().pipe(sourcemaps.init()).pipe(tsProject()); | ||
|
||
return merge(tsResult, tsResult.js) | ||
.pipe(sourcemaps.write(".")) | ||
.pipe(dest("dist")); | ||
}; | ||
|
||
const buildCss = () => { | ||
return src("lib/**/*.scss") | ||
.pipe(sass(SASS_OPTIONS)) | ||
.pipe(dest("dist")) | ||
.pipe(refresh(lrserver)); | ||
}; | ||
|
||
const replaceCss = () => { | ||
return src(["dist/**/*.d.ts", "dist/**/*.js", "dist/**/*.map"]) | ||
.pipe(replace(".scss", ".css")) | ||
.pipe(dest("dist")); | ||
}; | ||
|
||
const stripComments = () => { | ||
return src("dist/**/*.js").pipe(strip()).pipe(dest("dist")); | ||
}; | ||
|
||
const licenseAndReadme = () => { | ||
return src(["LICENSE", "README.npm.md"]).pipe(dest("dist")); | ||
}; | ||
|
||
exports.default = series( | ||
buildComponents, | ||
buildCss, | ||
replaceCss, | ||
stripComments, | ||
licenseAndReadme, | ||
); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Information about the contents of this package. | ||
# NOTE: Recipes moving to a new repo. This file just satisfies build requirements. | ||
|
||
directory: | ||
- name: N/A | ||
doc: https://polkadot.cloud |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.