-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f7c1116
commit 5074633
Showing
11 changed files
with
39 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
/* global Bare */ | ||
const assert = require('bare-assert') | ||
const os = require('bare-os') | ||
const url = require('bare-url') | ||
const { Addon } = Bare | ||
|
||
const addon = Addon.load(os.cwd()) | ||
const addon = Addon.load(url.pathToFileURL(`./test/fixtures/addon/prebuilds/${Addon.host}/addon.bare`)) | ||
|
||
assert(addon === 'Hello from addon') | ||
assert(addon.exports === 'Hello from addon') |
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,8 +1,9 @@ | ||
/* global Bare */ | ||
const assert = require('bare-assert') | ||
const path = require('bare-path') | ||
const os = require('bare-os') | ||
const build = require('./helpers/build.json') | ||
const url = require('bare-url') | ||
const { Addon } = Bare | ||
|
||
assert(Addon.resolve(os.cwd()) === path.normalize(build.output.bare_addon)) | ||
const resolved = Addon.resolve('.', url.pathToFileURL('./test/fixtures/addon/')) | ||
|
||
assert(url.fileURLToPath(resolved) == path.resolve('./test/fixtures/addon/prebuilds', Addon.host, 'addon.bare')) |
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,2 +1,16 @@ | ||
add_subdirectory(addon) | ||
add_subdirectory(bundle) | ||
find_bare_dev(bare_dev) | ||
|
||
list(APPEND fixtures | ||
addon | ||
bundle | ||
) | ||
|
||
foreach(fixture ${fixtures}) | ||
execute_process( | ||
COMMAND "${bare_dev}" install --debug | ||
OUTPUT_QUIET | ||
ERROR_QUIET | ||
WORKING_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/${fixture}" | ||
COMMAND_ERROR_IS_FATAL ANY | ||
) | ||
endforeach() |
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,10 +1,16 @@ | ||
cmake_minimum_required(VERSION 3.25) | ||
|
||
project(bare_addon C) | ||
|
||
include(bare) | ||
|
||
add_bare_bundle( | ||
ENTRY mod.js | ||
OUT mod.bundle | ||
) | ||
|
||
add_custom_target( | ||
test_bundle | ||
bundle | ||
ALL | ||
DEPENDS mod.bundle | ||
) |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
/* global Bare */ | ||
const assert = require('bare-assert') | ||
const build = require('./helpers/build.json') | ||
const { Addon } = Bare | ||
|
||
const mod = require(build.output.bare_addon) | ||
const mod = require(`./fixtures/addon/prebuilds/${Addon.host}/addon.bare`) | ||
|
||
assert(mod === 'Hello from addon') |
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,6 +1,7 @@ | ||
/* global Bare */ | ||
import assert from 'bare-assert' | ||
import build from './helpers/build.json' | ||
const { Addon } = Bare | ||
|
||
const { default: mod } = await import(build.output.bare_addon) | ||
const { default: mod } = await import(`./fixtures/addon/prebuilds/${Addon.host}/addon.bare`) | ||
|
||
assert(mod === 'Hello from addon') |