Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

convert DOM creation/manipuation code to concise Solid JSX#1716

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
trusktr wants to merge7 commits intodevelop
base:develop
Choose a base branch
Loading
fromdom-with-solid
Draft
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion.github/workflows/lint.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [12.x,14.x]
node-version: [16.x,17.x]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion.github/workflows/test.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [12.x,14.x]
node-version: [16.x,17.x]
os: ['macos-latest', 'ubuntu-latest', 'windows-latest']

steps:
Expand Down
4 changes: 4 additions & 0 deletions.gitignore
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,3 +8,7 @@ themes/

# exceptions
!.gitkeep

# libraries don't need lock files, only apps do.
package-lock.json
yarn.lock
4 changes: 2 additions & 2 deletionsDockerfile
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,7 @@ WORKDIR /app
COPY . .
RUN rm package-lock.json
RUN npm install
RUN npx playwright install
RUN npx playwright install
RUN npm run build
ENTRYPOINT ["npm", "run"]
CMD ["test"]
CMD ["test"]
10 changes: 2 additions & 8 deletionsbabel.config.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
module.exports = {
presets: [
[
'@babel/preset-env',
{
targets: {
node: 'current',
},
},
],
['babel-preset-solid', { generate: 'dom', hydratable: true }],
['@babel/preset-env', { targets: { node: 'current' } }],
],
};
28 changes: 15 additions & 13 deletionsbuild/build.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
const rollup = require('rollup')
constbuble = require('rollup-plugin-buble')
const commonjs = require('rollup-plugin-commonjs')
const nodeResolve = require('rollup-plugin-node-resolve')
const { uglify } = require('rollup-plugin-uglify')
const replace = require('rollup-plugin-replace')
constbabel = require('@rollup/plugin-babel').default
const commonjs = require('@rollup/plugin-commonjs')
const nodeResolve = require('@rollup/plugin-node-resolve').default
const {terser:uglify } = require('rollup-plugin-terser')
const replace = require('@rollup/plugin-replace')
const isProd = process.env.NODE_ENV === 'production'
const version = process.env.VERSION || require('../package.json').version
const chokidar = require('chokidar')
Expand All@@ -22,10 +22,10 @@ async function build(opts) {
.rollup({
input: opts.input,
plugins: (opts.plugins || []).concat([
buble({
transforms: {
dangerousForOf: true
}}),
babel({
babelHelpers: "bundled",
presets: ['babel-preset-solid']
}),
commonjs(),
nodeResolve(),
replace({
Expand All@@ -49,10 +49,12 @@ async function build(opts) {

console.log(dest)
return bundle.write({
format: 'iife',
output: opts.globalName ? {name: opts.globalName} : {},
file: dest,
strict: false
output: {
format: 'iife',
name: opts.globalName,
file: dest,
strict: false
},
})
})
}
Expand Down
15 changes: 6 additions & 9 deletionsbuild/ssr.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
var rollup = require('rollup')
var buble = require('rollup-plugin-buble')
var async = require('rollup-plugin-async')
var replace = require('rollup-plugin-replace')
var babel = require('@rollup/plugin-babel').default
var replace = require('@rollup/plugin-replace')

rollup
.rollup({
input: 'packages/docsify-server-renderer/index.js',
plugins: [
async(),
replace({
__VERSION__: process.env.VERSION || require('../package.json').version,
'process.env.SSR': true
}),
buble({
transforms: {
generator: false
}
})
babel({
babelHelpers: "bundled",
presets: ['babel-preset-solid']
}),
],
onwarn: function () {}
})
Expand Down
27 changes: 26 additions & 1 deletiondocs/index.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -118,7 +118,7 @@
'/zh-cn/': '搜索',
'/': 'Search',
},
pathNamespaces: ['/es', '/de-de', '/ru-ru', '/zh-cn']
pathNamespaces: ['/es', '/de-de', '/ru-ru', '/zh-cn'],
},
vueComponents: {
'button-counter': {
Expand DownExpand Up@@ -208,6 +208,31 @@
);
});
},

/**
* Docsify tests rely on this plugin.
*
* This plugin increments a `data-render-count="N"` attribute on the
* `<body>` element after each markdown page render. F.e.
* `data-render-count="1"`, `data-render-count="2"`, etc.
*
* The very first render from calling docsifyInit() will result in a
* value of 1. Each following render (f.e. from clicking a link) will
* increment once rendering of the new page is finished.
*
* We do this so that we can easily wait for a render to finish before
* testing the state of the render result, or else we'll have flaky
* tests (a "race condition").
*/
function RenderCountPlugin(hook) {
hook.init(() => {
document.body.dataset.renderCount = 0;
});

hook.doneEach(() => {
document.body.dataset.renderCount++;
});
},
],
};
</script>
Expand Down
27 changes: 26 additions & 1 deletionindex.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -82,7 +82,7 @@
'/zh-cn/': '搜索',
'/': 'Search',
},
pathNamespaces: ['/es', '/de-de', '/ru-ru', '/zh-cn']
pathNamespaces: ['/es', '/de-de', '/ru-ru', '/zh-cn'],
},
plugins: [
DocsifyCarbon.create('CEBI6KQE', 'docsifyjsorg'),
Expand DownExpand Up@@ -110,6 +110,31 @@
);
});
},

/**
* Docsify tests rely on this plugin.
*
* This plugin increments a `data-render-count="N"` attribute on the
* `<body>` element after each markdown page render. F.e.
* `data-render-count="1"`, `data-render-count="2"`, etc.
*
* The very first render from calling docsifyInit() will result in a
* value of 1. Each following render (f.e. from clicking a link) will
* increment once rendering of the new page is finished.
*
* We do this so that we can easily wait for a render to finish before
* testing the state of the render result, or else we'll have flaky
* tests (a "race condition").
*/
function RenderCountPlugin(hook) {
hook.init(() => {
document.body.dataset.renderCount = 0;
});

hook.doneEach(() => {
document.body.dataset.renderCount++;
});
},
],
};
</script>
Expand Down
2 changes: 2 additions & 0 deletionsjest.config.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,6 +20,7 @@ module.exports = {
// Unit Tests (Jest)
{
...sharedConfig,
preset: 'solid-jest/preset/browser',
displayName: 'unit',
setupFilesAfterEnv: ['<rootDir>/test/config/jest.setup-tests.js'],
testMatch: ['<rootDir>/test/unit/*.test.js'],
Expand All@@ -28,6 +29,7 @@ module.exports = {
// Integration Tests (Jest)
{
...sharedConfig,
preset: 'solid-jest/preset/browser',
displayName: 'integration',
setupFilesAfterEnv: ['<rootDir>/test/config/jest.setup-tests.js'],
testMatch: ['<rootDir>/test/integration/*.test.js'],
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp